After upgrading from Ubuntu 16.04 LTS to the new 18.04, even before rebooting the system, ping won't work anymore. It just hangs indefinitely and doesn't matter if I ping a DNS, an IP or even the IP of a CentOS VM running in the same system. Now neither SSH is working. When I try to SSH into the VM, it hangs for a while up to the timeout.

Everything was working before.

I have internet working perfectly. I can curl anything, browse any website, install anything with apt. The only problem is that I need SSH working and it seems the ping problem is related to it.

I already checked my firewall, which is not rejecting anything, my ethernet configuration, which is auto by DHCP, and my hosts, which didn`t change from before upgrading.

My ethernet configuration:

> ifconfig | grep 'eno1:\|lo:' -A6
eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet  netmask  broadcast
        inet6 fe80::4ff2:e79a:8a81:93e1  prefixlen 64  scopeid 0x20<link>
        ether dc:4a:3e:7d:f1:33  txqueuelen 1000  (Ethernet)
        RX packets 1007708  bytes 1386860256 (1.3 GB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 335796  bytes 30111660 (30.1 MB)
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet  netmask
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 3319  bytes 313220 (313.2 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3319  bytes 313220 (313.2 KB)
> ▮

My route configuration:

> route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway         UG    100    0        0 eno1   U     100    0        0 eno1
link-local     U     1000   0        0 eno1   U     0      0        0 virbr0
> ▮

My hosts configuration:

> cat /etc/hosts                                                                                                                                                      localhost
> ▮

My firewall configuration:

> sudo iptables -S
-A INPUT -i virbr0 -p udp -m udp --dport 53 -j ACCEPT
-A INPUT -i virbr0 -p tcp -m tcp --dport 53 -j ACCEPT
-A INPUT -i virbr0 -p udp -m udp --dport 67 -j ACCEPT
-A INPUT -i virbr0 -p tcp -m tcp --dport 67 -j ACCEPT
-A FORWARD -d -o virbr0 -m conntrack --ctstate RELATED,ESTABLISHED -j ACCEPT
-A FORWARD -s -i virbr0 -j ACCEPT
-A FORWARD -i virbr0 -o virbr0 -j ACCEPT
-A OUTPUT -o virbr0 -p udp -m udp --dport 68 -j ACCEPT
> ▮

Here is the ping output to my VM's ip (, which is on and I can access through virt-manager no problem:

> ping
PING ( 56(84) bytes of data.

It stays there indefinitely.

However, it works if I ping localhost:

> ping localhost
PING localhost ( 56(84) bytes of data.
64 bytes from localhost ( icmp_seq=1 ttl=64 time=0.068 ms
64 bytes from localhost ( icmp_seq=2 ttl=64 time=0.068 ms
64 bytes from localhost ( icmp_seq=3 ttl=64 time=0.068 ms
--- localhost ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2052ms
rtt min/avg/max/mdev = 0.068/0.068/0.068/0.000 ms
> ▮

Pinging to another machine on the same network also works:

> ping
PING ( 56(84) bytes of data.
64 bytes from icmp_seq=1 ttl=64 time=0.580 ms
64 bytes from icmp_seq=2 ttl=64 time=0.313 ms
64 bytes from icmp_seq=3 ttl=64 time=0.277 ms
64 bytes from icmp_seq=4 ttl=64 time=0.530 ms
64 bytes from icmp_seq=5 ttl=64 time=0.248 ms
--- ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4097ms
rtt min/avg/max/mdev = 0.248/0.389/0.580/0.139 ms
> ▮

Pinging to an external website won't:

> ping www.google.com
PING www.google.com ( 56(84) bytes of data.

But that might be another issue related with my network manager. Again, I can browser no problem.

Here is the SSH output:

> ssh

After some time:

> ssh
ssh: connect to host port 22: Connection timed out
> ▮

Yes, the VM's port 22 is open for SSH connections (everything was working before the update):

(VM) > netstat -tuplen | grep "servers\|Proto\|:22 "
Active Internet connections (only servers)
Proto   Recv-Q   Send-Q   Local Address   Foreign Address    State   User   Inode   PID/program
tcp          0        0*   LISTEN      0   18112     1295/sshd
tcp6         0        0           :::22              :::*   LISTEN      0   18114     1295/sshd
(VM) > ▮

Does anyone have any idea about how can I fix it?


Alright, forget it. I didn't check my VM's ip. Suddenly, it changed to another ip I don't know why. Checking ifconfig in VM gave me the right ip address.

I will keep the post for other people who may also forget to check it.

Thank you anyway.

  • @sebastian, thank you for the prompt reply. Sorry for not providing enough information before. I wasn't at the work at that time to provide the outputs. I edited the post. Now it should have enough information. – Teo May 22 '18 at 11:36

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.