Let’s suppose you need to access a remote firewall via its GUI using HTTPS, but your local IP is blocked by the firewall. However, you have SSH access to a remote Linux server that isn’t blocked but isn’t running a browser.
The below diagram shows the problem.

To get around this, it’s possible, using putty, to create an SSH tunnel through the Linux Server giving you access to the firewall’s GUI (from your local machine).
This is how you do it:
Step 1 – Create a standard SSH connection to the Linux Server and save it. If you use public/private ssh keys, then use those as normal.

Step 2 – In the category window choose Connection > SSH > Tunnels. Enter a random unused port for the Source port, and the IP address and port number of the destination (the HTTPS firewall GUI in our example):

Step 3 – Click Add

Step 4 – Next save the configuration. Choose, Session > Save.
Next, click Open to start the session. You’ll see a terminal session open as usual.

While the session is open the tunnel should be up. Closing the session will tear down the tunnel.
The status of the tunnel can be checked from the event log (right-click the terminal window while holding down ctrl and select Event Log). You are looking for an entry showing the local port forwarding to the destination. In our example, this shows as the following:
“2023-07-04 16:17:13 Local port 8888 forwarding to 192.168.0.2:443”
Step 5 – Finally to access the destination type https://127.0.0.1:8888 into your browser. This will forward the request over ssh via the Linux server and translate the IP and port number.
