Ubuntu 12.04 ping 8.8.8.8 does not work on one network only
The other network (network B) most probably has a firewall implemented, which is configured to block ICMP packets (pings). This is most likely the case if the network is in a university, at work, or maybe even a (smart) coffee shop.
When you ping 8.8.8.8
, an IP should be mentioned in that message you got. I'm betting that that IP is 192.168.1.1, so the error would be something like reply: 192.168.1.1 destination host unreachable
. Also, to be more certain, you can do a traceroute. This shows you the path that your ping travels, so we can find exactly where it stops. So, if you run the command traceroute -n 8.8.8.8
, you'll probably get something like this:
I think you might need to install traceroute using sudo apt-get install traceroute
.
alaa@aa-UBUNTU:~$ traceroute -n 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
1 192.168.1.1 1.204 ms 1.953 ms 2.101 ms
2 * * *
3 * * *
...and those stars will just keep on coming. This means that your ping went to 192.168.1.1, but then it stopped, it hit a wall, so you'll never be able to ping 8.8.8.8.
Also, this has nothing to do with DNS, because you're pinging an IP, not a hostname like google.com. DNS is a system that merely translates the words google.com
to something like 74.125.236.105
. If there was something wrong with your DNS settings, ping google.com
would return something like this: ping: unknown host google.com
, but ping 8.8.8.8
would not, because you're already pinging a direct IP.
I suggest you revert the changes you made to NetworkManager.conf.
Related videos on Youtube
canatan
Updated on September 18, 2022Comments
-
canatan over 1 year
I'm using Ubuntu 12.04. I can connect to and use the internet on one wireless network (say A) and not on the other network (say B). I can connect to B and get an IP address.
When I ping 127.0.0.1 it works When I ping 192.168.1.1 it also works but when I ping 8.8.8.8 I get destination host unreachable.I tried commenting out dns=dnsmasq in /etc/NetworkManager/NetworkManager.conf but that didn't work and then restarting the network manager.
I also tried to flush the cache using ip route flush cache but that also did not work.
Any help would be appreciated.
Thanks
-
canatan almost 11 yearsHey Alaa I did do what you said. Here are the results: 'traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets 1 * * * 2 * * * 3 * * * 4 * * * 5 * * * 6 * * * 7 * * * 8 * * * 9 * * * 10 * * * 11 * * * 12 * * * 13 * * * 14 * * * 15 * * * 16 * * * 17 192.168.1.1 9.008 ms !N * * '
-
Alaa Ali almost 11 yearsYes, this means that in network B,
192.168.1.1
is blocking your pings, because it has some kind of firewall implemented. After re-reading your question though, what is your main issue? Is it that you can'tping 8.8.8.8
, or that you can't access the internet (that is, you can't browse anything)? -
canatan almost 11 yearsIts both. I can neither ping 8.8.8.8 nor access the internet. Cant do a sudo apt-get if that helps. Network B is actually my home network and A is my school network. I guess I need to call comcast ?
-
Alaa Ali almost 11 yearsOne last question. What is the output of
route -n
? -
canatan almost 11 yearsThe problem seems to have magically fixed itself atleast for now. Thank you Alaa