Introduction
An SSH tunnel can be used to securely route network traffic from a local machine through a remote server. This can be useful when you need to access applications or websites that are restricted to a particular network or when the destination application is available only within a private network.
Some common use cases include:
- Accessing an application or domain that is restricted to a particular network.
- Accessing an application or domain hosted within a private network.
- Routing browser traffic through a remote server when access restrictions are based on the source IP address.
In this guide, we will configure an SSH tunnel using PuTTY and then configure Firefox to use the tunnel through a SOCKS proxy.
Prerequisites
Before starting, make sure you have:
- SSH access to the remote server.
- The server’s IP address or hostname.
- The SSH port number.
- PuTTY installed on your local machine, or an SSH-capable terminal.
- Firefox installed if you want to configure browser traffic through the tunnel.
Implementation
Step 1: Configure the SSH Connection in PuTTY
Open PuTTY and configure the SSH connection.
Under Session, enter the following details:
Host Name (or IP address):
<Your Server IP address>
Port:<SSH port number>
Connection Type: SSH
The default SSH port is usually 22.

Step 2: Configure the SSH Tunnel
In PuTTY, navigate to:
Connection → SSH → Tunnels
Configure the tunnel with the following settings:
Source port:
1990
Destination: Select Dynamic
Click Add.
The source port 1990 will be used as the local SOCKS proxy port.

Step 3: Establish the SSH Connection
Click Open in PuTTY.
Enter your SSH username and password when prompted.
Once the SSH connection is established, the tunnel is ready to use.
Configure Firefox to Use the SSH Tunnel
Now configure Firefox to route browser traffic through the SSH tunnel.
Step 4: Open Firefox Network Settings
Open Firefox and navigate to:
Preferences → Options
Then go to:
Advanced → Network → Settings

Step 5: Configure the SOCKS Proxy
Select:
Manual proxy configuration
Configure the SOCKS proxy as follows:
SOCKS Host:
localhost
Port:1990
The port must match the source port configured in PuTTY.
Click OK to save the configuration.
Verification
The SSH tunnel is now configured, and Firefox traffic can be routed through the remote server.
To verify the setup, access an IP-checking website such as:
http://whatismyip.com
If the proxy configuration is working correctly, the public IP address shown should be the server’s IP address rather than your local ISP’s public IP address.
Conclusion
An SSH tunnel provides a convenient way to route traffic from a local machine through a remote server. In this example, PuTTY is configured to create a dynamic SSH tunnel on local port 1990, and Firefox is configured to use that port as a SOCKS proxy.
This setup can be useful for accessing applications or services that are restricted based on network location or source IP address.
Frequently Asked Questions
1. What is an SSH tunnel?
An SSH tunnel creates a connection through an SSH server that can be used to securely route network traffic between a local machine and a remote server.
2. Why is the PuTTY source port set to 1990?
1990 is the local port used for the SOCKS proxy in this example. You can use another available local port, provided the same port is configured in Firefox.
3. How can I verify that Firefox is using the SSH tunnel?
After configuring the SOCKS proxy, check your public IP address using an IP-checking website. If the tunnel is working, the external IP should correspond to the remote server rather than your local ISP connection.
Related Articles
Talk to our experts
Looking for the right technology solution for your business? Our team of experts can help you with development, cloud, DevOps, design, and a wide range of other technology needs. Get in touch with our team here.