Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am using an HTTP proxy server to connect to the internet.

Because of that my pings are not working


says Unreachable Host

How can I configure ping to use the HTTP proxy?

share|improve this question
It may be helpful to know what setup you are using? Is this a linux server with squid and iptables for example? – Tim Alexander Aug 13 '10 at 9:51

2 Answers 2

up vote 10 down vote accepted

In general you can't. ping needs a direct network connection on the IP level to do its work. A proxy works on a higher layer of the TCP/IP network model, where there is no direct access to the IP protocol.

You would need to somehow circumvent the proxy (change firewall settings, use a VPN, ...). Whether this is possible (and allowed) depends on your network configuration, but it's probably not possible.

As a workaround, there are many web-based ping services available (search for "web-based ping"). These will work.

share|improve this answer
Web-based pings cannot be used to test the latency of my own connection, as they are initiated from the server. Maybe some implementation of ping in java that runs in the browser. – Jose Gómez Sep 8 at 8:14
While the ICMP protocol operates on ISO/OSI layer 3, the ping utility operates on layer 7. To quote my CS teacher, ping is a 3-7 hybrid. It may well be possible that the layer 7 part is capable of proxy handling. This would explain why my answer to this question works (at least for me). – the_Seppi Sep 13 at 18:56
@the_Seppi: Interesting, I've never heard of ping being layer 7. Do you have any pointers for further reading? – sleske Sep 13 at 20:28

You may try this,But first you have to install curl.

http_proxy=http://<proxy_username>:<proxy_password>@<your_proxy_server>:<your_proxy_port>  curl -I
share|improve this answer
this is not PING. – törzsmókus Feb 24 at 20:42

Your Answer


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.