MexiCode Ideas en codigo

Socks Proxy via SSH Tunneling

Posted on January 9, 2010

Probably, everyone and their dog knows how to set up a ssh tunnel for safe webbrowsing.

Well, I didn't know, so I'm writing how to do it.

I have a SSH account on a webserver somewhere (I'm not telling). It's really simple, log in to your account with a local port that forwards all traffic to your ssh connection. Do you know how to do it? no? Well..

Windows
start putty.exe -D 1080 -ssh servername -l username -pw password

Linux
ssh username@servername -D 1080

If you don't have putty, shame on you. Download it here

Now, open your webbrowser of choice, and edit the proxy information:

Address: 127.0.0.1 (thats your own computer)
Port: 1080
Proxy Type: SOCKSv5

And that should do it.

Now, here's an extra tip for all of you who use Firefox. We can do all of our DNS Lookups using our proxy (Effectively overriding any dns webfilter your company may use).

Open about:config and look for network.proxy.socks_remote_dns value and change it to true. This only works with SOCKSv5.

Enjoy :D