SSH Tunneling and Proxy Configuration on Linux

So I’ve spent quite a while trying to make this work and wanted to document it for others to use.  What this is going to do is allow you to proxy you web traffic through a server using SSH.  In the case of my setup it will be Linux on both ends (server running CentOS and PC running Mint).  Alright so let’s get started.

You will really only need two parts for this, a server (or VPS) running Linux with SSH enabled and a Linux computer. 

First you need to establish the SSH tunnel to the server using the D flag to bind to an address.  We will also be enabling compression which is the C flag:

ssh -D 8080 -C

Obviously you will need to replace “user” with your username and “” with your servers address.  It will prompt you for the password after you hit enter.

You now have the needed tunnel established to the server.  You have two options at this point, either configure Firefox alone to use the proxy or setup the system for the proxy.  If you are wanting only to proxy Firefox take a look here.   You will want to only fill in the SOCKS proxy with and a port of 8080.

If you want to setup the proxy for the entire system you need to go to menu->preferences->network.  Scroll to the bottom and choose network proxy.  Fill in the SOCKS host with and port with 8080 and turn it on.

You are set to go!  You will now have your traffic tunneled through the server.  Enjoy!

Leave a Reply

Your email address will not be published. Required fields are marked *