SSH Socks Proxy

There might be several reasons to tunnel your internet traffic. In my case, I had to test a website I was developing at Zeropoint.it. Local issues prevented me from viewing the site in its pure uncached form, so I had to use a proxy.

Another reason why you might be interested in a proxy is when you’re surfing on a connection which has internet filtering in place: some open hotspots do not allow browsing to certain websites. A final reason is security. When you’re on an unsecure connection (a friend’s house, hotel wifi), and you want to do some secure browsing (e-banking, private browsing), using a secured tunnel to a proxy is a possible solution.

There are websites which provide proxy functionality (like HideMyAss), lists of free proxy servers (here) and free software to host your own proxy (Squid, Glype). But if you’re using Linux and have access to a machine which has unfiltered internet access, there is a very easy way:

ssh -Cv -D portnumber username@system

This sets up a SOCKS proxy on the specified portnumber. You can point your applications to that portnumber, and all traffic will be routed through the ssh tunnel. For most browsers, there are excellent Proxy plugins like FoxyProxy for Firefox and Proxy Switchy! for Chrome. Of course, security is dependant  on the system you are connecting to, but in most cases, I tend to trust my own boxes the most :) Just a small note: make sure your browser also does DNS resolving using the proxy.

Comments are closed.