Kiriakos Krastillis's Blog

SOCKS the simple proxy solution

SOCKS, or Socket Secure, is one of those technologies that keeps coming up when You live in a world of interconnected temporary servers.

SOCKS has been tightly integrated with OpenSSH which allows you to do:

ssh -D 41337

This will add a SOCKS proxy server to your localhost port 41337 which will forward all IP traffic to Naturally only the SOCKS bound IP traffic will go that way. To showcase this let's look at the result of DuckDuckGo's MyIP tool.

curl -L --include '' | grep -oE "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]"  
curl --proxy socks5h://localhost:25222 -L --include '' | grep -oE "[0-9]+\.[0-9]+\.[0-9]+\.[0-9]"  

So the first request should output Your own Public IP while the other one should return the IP of Your Proxy.

Tada. Now You are free to use any SOCKS aware application via Your personal Proxy.