Setting up a SSH tunnel using Putty

Every now and then I get stuck on a windows machine and since one bad never comes alone I also have to deal with a firewall configured by an former NSA employee 🙂 In these situations I just love Putty and its ability to create tunnels. Here is a small example of how:

I am on my local machine (127.0.0.1) and I need to use port 1414 on computer 10.10.10.2. My local machine is not allowed to connect to 10.10.10.2 directly (due to firewall rules) but it is allowed to connect to 10.10.10.1. 10.10.10.1 is allowed to connect to 10.10.10.2. Here is a simple schematic of the situation:

My local machine:1414 -> 10.10.10.1 -> 10.10.10.2:1414

Here is one way to set it up in Putty

  1. First we input the address and port to 10.10.10.1 (the “middle” machine)
    Putty session configuration
  2. Then we setup the tunnel (SSH->Tunnels) and press “Add”
    Putty tunnels configuration
    The Source port is the port on my local machine. The Destination is the remote computer we want to connect to (10.10.10.2)
  3. Now we press “Open” and enter our credentials. Done!

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>