Copyright © 2011
Thinkhole Labs
There are times when you want to connect to the Internet through unknown and/or insecure networks such as the local Panera or other WiFi hotspot. If you aren’t careful, you might make it all too easy for someone to sniff your connection using Ettercap.
One of the best ways to secure your connection is to use a VPN, but that isn’t always practical. So here’s a way to securely connect to the net using only an SSH client and a remote box that you control/trust.
Here are two ways to make a secure tunnel using SSH. The first method uses the command line available on most respectable operating systems. The second method uses a GUI SSH client called PuTTY that is available for both Windows and Linux. Choose whichever method you like best.
If you have the command-line version of OpenSSH already installed on your computer, you don’t need to mess with PuTTY. Just run the following to set up your tunnel:
ssh -D 7070 user@host.example.com
If you are using OS X, you can open up a terminal and do it from there.
Run PuTTY and create a new session to connect to the remote host that is running OpenSSH. Fill in the hostname, the port (usually 22), and make sure SSH is checked. Give it a session name and hit Save:
Click on Tunnels on the left and set up dynamic fowarding for a local port (e.g. 7070). Under “Add new forwarded port” type in 7070 for the source port, leave the destination blank, and check Auto and Dynamic. Then it the Add button. If you did it correctly, you’ll see D7070 listed in the Forwarded Ports box:
That’s it for tunnels, as there is no need to create more than one. Remember to save your session profile in PuTTY so you don’t have to set up the tunnel next time.
Double click on the connection profile and type in your username and password when prompted.
Go to Tools, Options, Advanced, Network (tab), Settings, and manually configure the proxy:
If you'd like more control over which sites are proxied or would like to easily switch between multiple proxies, check out FoxyProxy. It's really quite awesome.
Go to Tools, Preferences, Network (tab), and configure a SOCKS 5 proxy server:
Leave the username and password fields blank.