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

Is there an easy way, preferably by using the Linux terminal, to check if a Socks5 proxy works?

share|improve this question

2 Answers 2

up vote 17 down vote accepted

If you created the proxy by yourself you should first of all check whether there is an open port (the p argument only works if the concerning process is yours or you are root):

netstat -tlnp

This should give you a line like: (I have a proxy on localhost:8888)

tcp        0      0*               LISTEN

If you found such a line or the proxy isn't yours, try sending packets through it. For example request a web page with curl:

curl --socks5 localhost:8888

Should output some HTML stuff. Hope this helps to search for mistakes ;-)

Aux: For my example I created the proxy via:

ssh -o ServerAliveInterval=60 -D8888 someone@somewhere

Replace someone with your username and somewhere with your destination server. Of course using OpenSSH is just one method in a bunch of possible socks5 proxies.

share|improve this answer
ssh: Could not resolve hostname somewhere: Name or service not known – tony_sid Jun 28 '11 at 11:06
Of course you have to replace someone@somewhere with your username and your server, e.g. ssh -D8888 YOURUSER@YOURHOST ;-) – binfalse Jun 28 '11 at 11:09

To get curl to resolve the DNS on the other side, change --socks5 with --socks5-hostname.

See the man page for more info.

share|improve this answer

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.