Ramin Hossaini

Creating a tunnel and SOCKS proxy with Putty

Oct
06

Why?

  • Secure a public WiFi connection
  • Bypass country-specific-content websites (e.g sites that only allow users from the U.S)
  • Connect to a remotely-secured MySQL database via localhost

It’s pretty easy to do in Linux (and I think the command is pretty much the same in MacOS or with cygwin installed):

ssh -L localport:hostname:remoteport username@Server

This is how to do it with Putty

Open Putty and enter in the basics: the Server and port (22):

putty1

Next, create the tunnel. Enter the source port (in this example, it’s 3306 – a MySQL port) and leave the destination field empty (not always left blank, but it works for most cases)

putty2

The tunnel will be open/active as soon as you’ve logged in. Obviously, you still have to set up your proxy settings in whatever application you’re using (for those who don’t know, 127.0.0.1 is ‘localhost’):

proxy

One Response to Creating a tunnel and SOCKS proxy with Putty

  1. Pingback: OpenVPN through SSH | SysAdmin

Leave a Reply

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