Saturday 25 September 2010

Using putty to create an SSH tunnelled web proxy

You will need an SSH client (Putty) and an SSH server e.g. OpenSSH with an account you can access.

Download putty from http://www.chiark.greenend.org.uk/~sgtatham/putty/

Run Putty then setup a session to your SSH server
In the putty configuration enter your SSH server's address in the Host Name box.
Now we need to add the tunnel. Under Session -> Connection -> Tunnels
go to Add new forwarded port
and enter a source port number that isn't used on your PC (e.g. 3000)
then in the destination box enter the host you want to connect to
e.g. www.google.com:80
the port 80 is important

then click Add

now you can open the session.

When prompted, log in to the SSH server with your details.

Once you have logged in successfully, it's time to test the tunnel.
Run a web browser and navigate to localhost:3000 (replace 3000 with the port number you used for the source port).
You should see the site that you specified as the destination host for the tunnel.

You now appear to the remote web server as though your IP address is that of the SSH server rather than your local computer.

No comments:

Post a Comment