Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm using the shell on Ubuntu.

$ sudo apt-get install emacs

works fine, downloaded the packages and everything. On the other hand :

$ ping www.google.com

doesn't work :

PING www.google.com (74.125.230.240) 56(84) bytes of data.
^C
--- www.google.com ping statistics ---
7 packets transmitted, 0 received, 100% packet loss, time 6008ms

I really don't get how this is possible.

I'm using a proxy, which should be correct since I can access the web through my browser.

What am I missing ?

share|improve this question

migrated from stackoverflow.com Oct 10 '12 at 6:22

This question came from our site for professional and enthusiast programmers.

    
Can you try to ping 74.125.128.99 (hg-in-f99.1e100.net)? –  FamZheng Oct 9 '12 at 11:53
    
Doesn't work either –  sildar Oct 9 '12 at 11:54
    
May be you use different proxy settings for different users? do you have access to internet without proxy? –  F0G Oct 9 '12 at 12:06
1  
What does cat /etc/resolv.conf say? The proxy in your browser does not affect the ping command. –  Ярослав Рахматуллин Oct 9 '12 at 12:14
2  
http proxies do not affect ping as it runs on a different internet- protocol entirely. http runs over tcp, ping runs over icmp. –  Ярослав Рахматуллин Oct 9 '12 at 12:27

2 Answers 2

up vote 1 down vote accepted

Many corporate environments block ICMP "Echo request" and "Echo reply" packets at the firewall level. If you are on a corporate network ( as suggested by the fact that you are behind a proxy ), this is likely to be the cause. If ICMP packets are disallowed, "traceroute www.google.com" will also not work.

share|improve this answer

If your /etc/resolve.conf is not empty (i.e. contains valid dns nameserver addresses) then the other likely cause of this is the netfilter firewall. To deactivate it you can run (as root) iptables -F. I'm not sure if Ubuntu configures any rules by default (or with some common firewall package, but it's worth a try). If this is the case, you will have to search the Ubuntu wiki for instructions on how to configure netfilter (iptables).

Other reasons for ping not working include firewall restrictions of the firewall(s) of the network you are on, as you suggest. And there is always the case where the host you are pinging is configured to drop external pings, however this is not the case with google.

Any http proxy settings you have will never affect the ping program because HTTP uses IP/TCP while ping uses UDP/ICMP.

share|improve this answer
    
I can't answer before 7 hours. But here's the reason in the meantime : I juste had the possibility to check with someone else and it appears that my University doesn't seem to allow the pings. Even if their policies seem strange, the mystery has been undercovered. –  sildar Oct 9 '12 at 12:35
    
well, make the net-admin run iptables -F then :) –  Ярослав Рахматуллин Oct 9 '12 at 12:38

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.