Wednesday, December 09, 2009

Using ssh tunneling to tunnel your browser requests.

You will need :

  • A ssh server - a machine with access to the net which has ssh server installed on it. We will use this server to forward our requests. You should have access to the server.

  • A ssh client - installed on your machine.

  • A web browser - preferably firefox or internet explorer. Most basic browsers do not support socks proxy.

creating the tunnel :

The way to create the tunnel is

ssh -D 8888 <your_username>@<your_machine_ip_or_host>

What this command does is it hands over requests to localhost port 8888 to the server that you have specified. Ofcourse, you will have to login and authenticate yourself for the requests to reach the server. You can do this on whichever server you have access to. Using localhost would be the best.

Configure your browser :

To set socks proxy on firefox go to

Enter socks host as localhost and socks port as 8888. And bingo now your requests are being tunneled from your browser to the ssh server through a ssh tunnel. And from there to the web server.

You can use to check the external ip address of your machine.

You can use foxy proxy extension in firefox to have different proxy settings for different sites.

No comments: