Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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

share|improve this question
add comment

1 Answer 1

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.

share|improve this answer
    
Hey 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 * * ' –  canatan Jun 3 '13 at 2:55
    
Yes, 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't ping 8.8.8.8, or that you can't access the internet (that is, you can't browse anything)? –  Alaa Jun 3 '13 at 5:56
    
Its 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 ? –  canatan Jun 3 '13 at 16:50
    
One last question. What is the output of route -n? –  Alaa Jun 3 '13 at 17:30
    
The problem seems to have magically fixed itself atleast for now. Thank you Alaa –  canatan Jun 4 '13 at 2:44
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.