I try to ping my newly set up Ubuntu 18 server (running as VPS at some hosting provider) from the command line after I ssh into the machine. Both when using the public IP address (196.189.91.144) or the registered domain name (swapme.et) the just ping times out.
As I am a bit ignorant when it comes to server configuration, I'm lost and surprised this is not working, especially since I haven't had the same issue on previous VPS-servers I have fiddled with.
Do I need to do some extra manual configuration to get the loopback working? I thought it was possible to ping yourself using the public IP or domain name, out of the box(?)
This is what I have right now and what I can think of is relevant info for the solving the problem:
/etc/hostname
etisp
/etc/hosts
127.0.0.1 localhost.localdomain localhost
::1 localhost6.localdomain6 localhost6
# The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts$ ifconfig -a
ens3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 10.180.53.144 netmask 255.255.255.0 broadcast 10.180.53.255 inet6 fe80::f816:3eff:fe43:32d6 prefixlen 64 scopeid 0x20<link> ether fa:16:3e:43:32:d6 txqueuelen 1000 (Ethernet) RX packets 4478573 bytes 324094022 (324.0 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 279023 bytes 41316618 (41.3 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 730566 bytes 43043266 (43.0 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 730566 bytes 43043266 (43.0 MB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0Firewall rules
Status: active
Logging: on (low)
Default: deny (incoming), allow (outgoing), disabled (routed)
New profiles: skip
To Action From
-- ------ ----
22/tcp (OpenSSH) ALLOW IN Anywhere
80/tcp ALLOW IN Anywhere
443/tcp ALLOW IN Anywhere
80,443/tcp (Nginx Full) ALLOW IN Anywhere
22/tcp (OpenSSH (v6)) ALLOW IN Anywhere (v6)
80/tcp (v6) ALLOW IN Anywhere (v6)
443/tcp (v6) ALLOW IN Anywhere (v6)
80,443/tcp (Nginx Full (v6)) ALLOW IN Anywhere (v6)Note that pinging other servers is working and pinging the public ip address and domain name from another machine is working
Thanks!
81 Answer
Based on what we are knowing so far, I'll try a first solution.
- There is the Server, that is send a Ping to the external Address
196.189.91.144 - There is the router, that knows the net
10.180.53.0/24including10.180.53.144and the external IP196.189.91.144 - There is the Internet, that knows the external IP
196.189.91.144
If anyone from the Internet will ping the external IP, maybe the router will answer or in advanced configuration the ICMP will be forwarded and die server will answer. We don't know yet.
But in any case, the router needs the information, to answer requests from the external address on the internal interface, too. Every route, that is not defined, will go though the standard gateway, in this case the router. But the router has a default gateway (most times the provider), too. And if the router send a ping to the provider, why should the provider answer it?
The options to handle it are depending on the exact setup. But in any case, why do I need to check the ICMP response of a system behind the NAT, from behind the NAT? There is the internal network more important.
3