Simple SSH Web Proxy

It is very easy to create a simple proxy via an SSH connection to a remote server. Here’s how you do it:

Ideally, you should set up key based authentication so that you don’t have to enter your password all the time. So first go do that. Then you just run the following command to create a proxy on localhost:

ssh -fCND

Let’s look at what the various switches do:

-D binds SSH to the IP and port specified
-f tells it to become a background daemon process
-N tells it that no commands are going to be run
-C enables compression so web browsing will be slightly faster

The next step is to simply add the necessary settings in your browser. With Firefox you go to Firefox menu > Preferences > Advanced > Network tab > Settings. Then select manual configuration and enter a SOCKS host and port as follows:

Firefox SSH Socks Proxy

Firefox SSH Socks Proxy

Now if you visit a site like you’ll see that your connection is being proxied through your server! This a quick, easy and cheap way to get a secure web proxy going.

Leave a Reply

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