Tuesday, November 24, 2009

Tunnel Firefox through SSH with a SOCKS Proxy

You should always be careful when connecting to a public WiFi connection, you don't want to end up like these poor saps at the Defcon convention.

I'm sure you have found yourself in a situation where you had an overzealous network filter block websites on a public connection (like at a library, work, or school). Or perhaps you don't quite trust the connection you are on?

If you have a Linux box at home that you can SSH into, you can set up a socks proxy to tunnel firefox over an SSH connection. To anyone else it will appear as if you were surfing from your servers connection.

The command is:

ssh -D 8080 user@host -N

(This will work with putty on windows too)

Leave that terminal running in the background then in firefox go to...

Tools > Options (Edit > Prefrences in Linux) > Advanced > Network > Connection Settings

And set up a manual proxy configuration under the SOCKS Host to connect to localhost (IP: and port 8080.

You can also set up Pidgin to use a SOCKS proxy in the same way for more secure IM conversations.


No comments: