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 am using an HTTP proxy server to connect to the internet.

Because of that my pings are not working

ping www.google.com

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 5 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

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 http://google.com/
share|improve this answer

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.