How do I set up a secure SSH SOCKS tunnel for web browsing?

There are many times when you may want to browse the web, but would like to keep your browsing history private.  You may also need to access a website that is blocked at your office or a cafe.  Setting up a secure SSH SOCKS tunnel to your server will enable you to route all web traffic through your host.  Here’s how:

  1. Open Putty.
  2. Expand the SSH tab in the tree on the left and select Tunnels.
  3. Under Add new forwarded port, type 1080 for the source port.
  4. Leave destination blank and select Dynamic and Auto on the radio buttons underneath.

    SSH Tunnel
    SSH Tunnel
  5. Go to the top of the tree on the left and select Session.
  6. Set the hostname of your Solar server.
  7. Under Saved Sessions, enter a name for this profile and then click Save.

    Putty
    Putty
  8. Doubleclick on the session name that you saved and you should be presented with an SSH login to your server.

After you have logged in, your tunnel will be established. Next you have to configure your browser to use the new tunnel.

Firefox

These instructions are written for version 21 but they can be followed for most versions.

  1. Click the Firefox button in the top left of the browser and select Options\Options.
  2. Click the Advanced tab.
  3. Select the Network tab underneath.
  4. Under Connection, click Settings.
  5. Select Manual proxy configuration.
  6. For Socks Host enter localhost and for the Port enter 1080.

Your secure SSH tunnel is now set up. To confirm that it is working, go to www.whatismyip.com. The IP address listed should be the IP address of your server.

Jonathan Hutchins

Leave a Reply