There are several ways to set up an SSH tunnel with different types of port forwarding. There are three types of port forwarding:
- Local port forwarding – With local port forwarding we can forward a port from our local machine to the server machine. The SSH client will listen for connections on a configured port and when it receives a connection it will create a tunnel to the SSH server.
- Remote port forwarding – Remote port forwarding works opposite from the local port forwarding. It will forward the traffic coming to a port on our server to our local computer machine and it will send back to a destination.
- Dynamic port forwarding – Dynamic port forwarding is a complex method of creating an SSH Tunnel, traversing a firewall or NAT through the use of a firewall. Communication can be established across a range of ports.
In this tutorial, we will create an SSH Tunnel using Putty and Firefox with Local port forwarding.
This setup is also useful if you are browsing the Internet via an unsecured network and you want to make your connection secure.
To complete this tutorial, we will have to download two pieces of software Putty and Firefox Web Browser on our local machine:
- Putty SSH Client (download)
- Firefox Web Browser (download)
- Linux-based virtual server with full SSH root access or a user with sudo privileges.
1. We need first to open Putty, then in the Session section, we need to add the Hostname(or IP address) of our server, and also SSH port is required.
3. Click on Session, we will add a name under Saved Sessions “Putty-Tunnel” and click on the Save button. Now we need to click on the Open button and make the connection. Once the connection is open we need to enter the sudo username and password to log in.
After a successful login, please note that you should not close the SSH connection.
Now that we have SSH tunnel, we need to configure Firefox Web Browser to use that tunnel. To work the configuration in Firefox with the SOCKS 5 protocol we have to use a local application.
First, we have to open the Firefox Web Browser and access Firefox’s menu:
We need to click on the Options icon. Find the Network Settings and click on the Settings button.
We will be prompted with a new window where we will configure the proxy configuration. We need to select the radio button for Manual proxy configuration. In the SOCKS Host field, we will enter localhost and in the Port field, we will enter the same port from our SSH connection.
We need to click the OK button to save and close the configuration.
Now, we have successfully created an SSH Tunnel using Putty and Firefox. We can open a new tab and start with browsing the Internet via secured network. To test if everything is set up correctly we can visit a site like http://icanhazip.com/ or enter in the google search bar “whats my ip” and you should see your remote IP Address.
Of course, you don’t have to configure SSH Tunnel using Putty and Firefox, if you use one of our Server Management Services, in which case you can simply ask our expert Linux admins to configure SSH Tunnel on Linux for you. They are available 24×7 and will take care of your request immediately.
PS. If you liked this post, on how to configure SSH Tunnel using Putty and Firefox on Linux, please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.