Jump to content
polak

Niewidoczny w sieci serwer z publicznym IP - Ubuntu 16.04

Recommended Posts

Mam skonfigurowane dwa interfejsy na serwerze opartym na Ubuntu Server 16.04 LTS. Poniżej konfiguracja z /etc/network/interfaces:

# The loopback network interface
auto lo
iface lo inet loopback
	# The primary network interface
auto enp1s0 enp2s0
iface enp1s0 inet static
        address 192.168.100.206
        network 192.168.100.0
        netmask 255.255.255.0
        broadcast 192.168.100.255
        #gateway 192.168.100.2
        #dns-nameservers 192.168.100.2
	iface enp2s0 inet static
        address X.X.X.181
        network X.X.X.176
        netmask 255.255.255.248
        gateway X.X.X.177
        dns-nameservers Y.Y.Y.Y Z.Z.Z.Z

Tablica routingu:

[email protected]:~$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         X.X.X.177  0.0.0.0         UG    0      0        0 enp2s0
X.X.X.176  0.0.0.0         255.255.255.248 U     0      0        0 enp2s0
192.168.100.0   0.0.0.0         255.255.255.0   U     0      0        0 enp1s0


Mogę pingować publiczny interfejs tego serwera (z niego samego):

[email protected]:~$ ping X.X.X.181
PING X.X.X.181 (X.X.X.181) 56(84) bytes of data.
64 bytes from X.X.X.181: icmp_seq=1 ttl=64 time=0.027 ms
^C
--- X.X.X.181 ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.027/0.027/0.027/0.000 ms

Ale nie mogę bramy, google.com, 8.8.8.8, jednym słowem - niczego:

[email protected]:~$ ping google.com
ping: unknown host google.com
[email protected]:~$ ping X.X.X.177
PING X.X.X.177 (X.X.X.177) 56(84) bytes of data.
From X.X.X.181 icmp_seq=1 Destination Host Unreachable
From X.X.X.181 icmp_seq=2 Destination Host Unreachable
From X.X.X.181 icmp_seq=3 Destination Host Unreachable
^C
--- X.X.X.177 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3016ms
pipe 3
[email protected]:~$ ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From X.X.X.181 icmp_seq=1 Destination Host Unreachable
From X.X.X.181 icmp_seq=2 Destination Host Unreachable
From X.X.X.181 icmp_seq=3 Destination Host Unreachable
^C
--- 8.8.8.8 ping statistics ---
4 packets transmitted, 0 received, +3 errors, 100% packet loss, time 3013ms
pipe 3

Mam jeszcze jeden serwer - z Ubuntu 14.04 LTS. Na nim komenda "ip route' zwraca minimalnie inną odpowiedź - bez słowa "onlink":

default via X.X.X.177 dev em4

Wszystkie inne rzeczy jak tablica routingu wyglądają poza tym identycznie. Oczywiście mogę z drugiego serwera pingować bramę, jest na nim internet, etc. Nie mam już pojęcia co jest źle...

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...