SSH Tunneling your web traffic

Recentlty I wanted to bypass a network for a little bit of extra privacy, one of the best ways of doing this is SSH tunneling. If you don't know what this I'll give you the 100,000 ft view. Lets say your are on a restricted network with a firewall that prevents you reading technical blogs as they are classed as "social media" and seen as BAD. With tunneling via SSH you can connect to, say your home computer and use that connection.

You don't have to do this from the terminal, there are tool out there for the Mac like SSH Tunnel Manager but as you'll see this is just quicker and easier. With SSH installed on your machine go to the terminal/command prompt with the following script

ssh -ND {proxy port} {username}@{ip address of your remote machine}

Small, but powerfull. So if your remote/home machine that has the internet connection you want to use has the IP address of "" and your account on that machine had the username "bofh" your connection script would be:

e.g. ssh -ND 9999 bofh@

The 9999 can be any port number you want. You just need to note it down for the next part, web browsing. For this I'm going to show you how to setup Firefox as its a setting you can do quickly and the same across OS's

  1. Every time you open a tunnel you'll need to set the "Manual proxy configuration" which you can copy from the following screen shot
    Firefox settings for
    The '9999' value is what ever port you set in the terminal script.
  2. The next bit you'll only need to do once. In your Firefox address bar go to about:config and set network.proxy.socks_remote_dns = true

Thats it!