Make a SSH-tunnel with Putty

There is different reasons why you want to make a SSH-tunnel, for example if you want to access some service inside a network not published out through the firewall for everyone or if you want to reach some system from a location with limited access to Internet. I have made a guide below showing how to make a SSH-tunnel to an internal webserver with an application named Putty. The only thing you need too make a SSH-tunnel is some kind om unit you have SSH access to and the application Putty. Putty is free and you can download it from their website.

The first thing you need to do is to open Putty and then write your address to the server, in this case testserver. If you want you can add a name in the Saved Session field for saving all settings for later usage.

ssh-tunnel_01

Then expand SSH and then press Tunnels like the picture below to get all settings. In the field Source port you need to add the port you want your local maskin should be listen to for this tunnel, in this case I choosed port 8080. In the Destination field you need to add the ip-address or DNS name for you server you want to access after the tunnel and the destination port for the service you want to access, in this case the ip address is 192.168.50.142 and the port is 80.

ssh-tunnel_02

Then press add and your settings should get to the field above like the picture below showing. Now with this settings I should be able to connect to my webbserver at my internal server 192.168.50.142 by typing http://localhost:8080

ssh-tunnel_03

Then you need to go back to Session and if you want to save this settings for later use, press save. Then you need to press open to connect to servern. A new window will show and you need to specify username and password to access the unit.

ssh-tunnel_05

Open a web browser when you successfully accessed the machine. Then type http://localhost:8080 as web address in the browser and then press enter. You will now go through the SSH-tunnel to you internal webserver and is this case it shows Apache default web page.

ssh-tunnel_06

Hope this guide helped you with your problem, add a comment below if you got any problem and I will answer you and help you.

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.