Ubuntu ping results in 100% packet loss

I use ubuntu 15.10 and I can ping localhost, gateway (192.168.1.1) and 8.8.8.8 successfully, but I can't ping any other hostname/IP address(outside my network that is). It results in 100% packet loss. What's interesting is when I ping a hostname, its resolved into IP address but the ping doesn't go through and I can ping any host/IP from the VM (debian) inside the Ubuntu box.

xxxx@xxxx:~$ ping -c 4 microsoft.com
PING microsoft.com (104.40.211.35) 56(84) bytes of data.

--- microsoft.com ping statistics --- 
4 packets transmitted, 0 received, 100% packet loss, time 3022ms

I've tried other hosts as well. Microsoft is an example. I had to reinstall traceroute only then it worked. I reinstalled the iputils-ping but I still have the same problem.


Since you where able to ping 8.8.8.8 which is clearly not within your own network at home I assume you only tested with microsoft.com which is in fact blocking icmp echo requests, as already stated in the comments below your question.

To see if you can ping outside you could use as example google.com or as you did the google-dns-server (8.8.8.8). You can as well use traceroute command to see where it hangs if you try to ping a certain host. So a traceroute 8.8.8.8 wields some output like this (taken from my side, may be different for your side):

michael@NEXUS-ONE:~$ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 64 hops max
  1   192.168.0.1  16,803ms  2,651ms  2,073ms 
  2   10.152.192.1  8,918ms  9,518ms  9,236ms 
  3   81.210.131.221  11,155ms  9,955ms  9,957ms 
  4   84.116.196.158  20,015ms  18,580ms  21,355ms 
  5   84.116.196.162  19,940ms  19,956ms  19,999ms 
  6   84.116.133.97  21,078ms  35,584ms  23,217ms 
  7   213.46.177.42  18,859ms  21,082ms  20,002ms 
  8   216.239.59.72  30,190ms  22,493ms  17,215ms 
  9   216.239.57.194  20,009ms  18,788ms  30,898ms 
 10   66.249.95.39  22,115ms  26,881ms  23,907ms 
 11   216.239.49.234  24,900ms  27,041ms  25,895ms 
 12   216.239.51.209  26,067ms  31,986ms  23,893ms 
 13   *  *  * 
 14   8.8.8.8  28,034ms  23,544ms  43,217ms 

As you can see the three stars on hop #13 may indicate a problem (slow response times etc.) if that happens on the last hop, but showing an IP it mostly means the host you try to reach ping wise doesn't respond to PING requests.