At one point in your computer, you may have used or come across a tunnel that requires an SSH connection. But what you may have missed is that it’s possible to use an active tunnel to access any remote infrastructure in your system. Also, you can even identify a specific port and a respective IP destination to have direct access. This can be achieved by configuring your PuTTY.
The SSH protocol features a unique tunneling system for other protocols while encrypting them. In this tutorial, we will show you how to use the terminal PuTTY to create an SSH tunnel. In this case, you can choose to use VPN, HTTP, or FTP tunnel and ensure you change the port numbers depending on the tunnel you decide to use.
To demonstrate this, we will use Firefox, Internet Explorer, and an RDP-enabled connection to show how to use a dynamic tunnel using an SSH connection and configure it with other types of protocol.
Step 1: Loading the Gateway
If you haven’t done so, start by creating the SSH gateway server and save it on your system. Now go to the Saved Sessions list and enter your name, then hit the Save button. If your sessions already exist in the list, click Load as the figure below indicates:
Step 2: Configuring PuTTY
On the left side, click Connection > SSH >Tunnels. Configure a particular local port. You can enter a port of your choice that you want to connect to under “Source Port.” Then include the destination address which is the server available from your SSH session and not from your local machine. The address should be put in as “Destination” as shown below:
On the table above there is a section labeled “Add a new forwarded port.” Type a port number of your choice (for this example we will use 5150). Leave the Destination section blank, and go ahead and select the Dynamic and Auto radio sections. Go ahead and click the Add button. You should have a text showing D5150 in the text box.
The window page should look like this:
On the left side is Putty navigation tree, click on the session node and save your configuration.
Note that it’s possible to configure different ports for several servers at the same time. When you configure a specific port, it will redirect you to the destination server and it will be easier to configure the PuTTY to your browser.
After the process of configuring is done, open your RDP connection then enter your local IP address followed by your local configuration port in PuTTY.
Step 3: Configuring the SSH Tunnel
Go to your Category menu and click Connection > SSH > Tunnels. This will be the first step to start the process. You can configure a Tunnel in several ways, in this case, we will cover the configuration using the browser tunnel.
Step 4: Configuring Your System Software
Now you can go ahead and configure your system software. In our case, we shall look at different methods for Firefox that applies for Chrome, Internet Explorer or Edge and for RDP users.
Configuring Internet Explorer on SSH Tunnel
As described below, the setting for configuring internet explorer on a tunnel will also apply for Microsoft Edge and Google Chrome.
To get started, search for the Control Panel and click the Internet Options button on your Explorer browser.
The illustration shown above should take you to the Control Panel homepage.
Click the connections section and select LAN settings.
On the Proxy Server section, check to ensure you are using a proxy server for your LAN. Hit the Advanced button.
Enter your host IP address in the Socks section. Don’t forget to include the specific port it’s configured with. Click OK. In this case, our example IP address is 127.0.0.1 with port 4567.
At this stage, you should note a the text on the dialog box. If your remote IP address is different from the internal one, check the section “Bypass proxy server for local addresses.”
Once you’re through with this process, it will be easy to access your tunnel on Internet Explorer, Chrome, or Edge by noting down the IP address. Use your IP address to view your service from the Destination server.
In this case, your configuration results should resemble the figure below:
Configuring your Firefox Browser
The process of configuring Firefox to use an SSH tunnel successfully is simple. Start your Firefox Browser then click Tools, then select the Options section.
Hit the Advanced button, located on the upper-right of your dialog box, and select the Network tab. You will see a dialog box that looks like this:
Go to Settings where a dialog box that reads Connection Settings will pop-up. Then hit the “Manual proxy configuration” button and enter your IP address in the SOCKS Host field. Just on the right side of the SOCKS Host, enter the Port number you used in the configuration of your SSH tunnel in PuTTY. The complete box should look like the figure below:
That’s it. Hit the OK button on the dialog above and Firefox is now configured and ready for use.
Congratulations! Now have a fully configured SSH Tunnel on PuTTY. You can now proceed to login to your remote server. To do so, scroll down to the bottom of your window and hit the Open button. On this page, you will see a PuTTY login section where you will enter your username and password. That’s it. Now you can open the tunnel easy and quick and configure it on your browser.
Check out these top 3 Best web hosting services