SSH, SOCKS proxies, and Firefox
This tip is courtesy of the Ubuntu Blog, but I just discovered it also works perfectly well in OS X and with some hot Putty action you could probably even pull it off with Windows. I’m writing this using it now.
A coworker of mine recently came down with some kind of outer space soul sucking virus and was ordered by his doctor to take a week off. Any hardcore geek will tell you that automatically means a lot of potential keyboard time, so he decided to setup a remote connection to the work network.
Being security-minded is important in the hosting world (it should be more important everywhere else) and so the inevitable question arose as to how he could best pull this off. Like an increasing number of laptop owners he also uses open wireless networks a lot (so do I) and you really shouldn’t be using open wireless with any password or data you really care about.
VPN’s work well for remote connections but can occasionally be a pain to set up depending on how your company has theirs configured.
If you have a computer/server running Linux or any other variety of OpenSSH server which is connected to a more trustworthy network you can create a SOCKS proxy SSH connection to it using the following command:
ssh -D 9999 user@server
The -D creates the SOCKS proxy, 9999 is the port, and user@server is your user name on the server you are connecting to and its host name or IP address. Then just set Firefox to use the SOCKS proxy as localhost and set the port to 9999. Presto – instant secure web traffic.