Secure Tunnel Creation Through Firewalls Using SSH and PuTTY

SSH tunneling can make an approved administrative service reachable without exposing that service directly to the internet. In an enterprise, the usual pattern is a workstation connecting to an authorized SSH bastion, after which a narrowly specified TCP connection is forwarded to a service that the bastion is permitted to reach. PuTTY makes this configuration accessible on Windows, but encryption alone does not make the route automatically safe: forwarding determines which side can open connections and which identity the destination ultimately sees.

The phrase “through a firewall” must not mean ignoring the firewall owner’s decision. An SSH tunnel is an explicitly authorized network path, subject to the same change record, access review and logging as a VPN or jump-host session. A workstation should not silently bypass blocked destinations merely because an SSH server is reachable. The correct setup begins with an approved service, permitted source and destination, accountable owner and a process for revoking the route.

Identify the three points in a local forwarding path

A typical local forward includes a listener on the operator’s computer, an authenticated SSH connection to the bastion, and a service reachable from that bastion. For example, the administrator may need temporary access to a private web-management console on TCP 443. The operator could choose unused port 8443 on their workstation and direct its traffic over SSH to the approved console. The chosen number 8443 is a local endpoint in this example; it is not a statement that every environment should expose management applications on that port.

Do not confuse the address used by the operator’s browser with the internal address seen by the bastion. Local binding, intermediate host reachability and target-side authentication are separate concerns. A working tunnel to a login page should still require the web application’s own authentication and authorization.

Configure the approved session with PuTTY

In PuTTY, specify the bastion hostname and SSH port in the Session panel, then verify its host key through the organization’s trusted fingerprint record before accepting a first connection. Under Connection, SSH, Tunnels, select Local forwarding. For the example, a loopback-only source such as `127.0.0.1:8443` limits which local interfaces receive the listener, while the destination is the approved internal service and its port. Add the rule and save the named PuTTY session under an administratively meaningful label.

PuTTY’s own manual distinguishes Local, Remote and Dynamic forwarding and warns that allowing connections from other hosts changes exposure. The local-forwarding setting should not be paired with “local ports accept connections from other hosts” by habit. Leave broad bindings off unless a specific, reviewed business requirement justifies them. The forwarding becomes active after the operator authenticates to the SSH server; it is not a substitute for checking the server’s host key.

Restrict forwarding on the SSH server

A bastion should permit connections only to approved targets. Restrict SSH users, authentication methods, source networks and forwarding destinations according to the server’s supported controls. The server owner should be able to answer which accounts may forward which ports and to which services. Shared bastion logins or generic unrestricted forwarding undermine investigation because multiple people can create indistinguishable paths.

Separate the tunnel policy from the destination application policy. A person granted SSH access may not be entitled to every application reachable from the bastion. Review privileged credential use, audit connection metadata and monitor changes to forwarded destination rules. If a one-time maintenance path is created, record its expiry and revoke it afterward.

Test the route without expanding its permissions

Start by confirming that PuTTY authenticated to the correct bastion and the intended local port is listening only on a loopback interface. Confirm the approved internal service responds through that port, then inspect the service’s own access log and authentication challenge. A connection refusal might indicate an incorrect target address, missing server-side permission, a closed destination port or a bastion network rule. It does not imply that the firewall needs to be disabled.

Do not expose the local listener to an entire office network to make a troubleshooting session easier. Do not store cleartext administrator credentials inside PuTTY session metadata, and do not disable host-key checks after an unexpected warning. Stop and consult the network or server owner if a destination remains unreachable rather than trying random alternative internal services.

Distinguish local, remote and dynamic forwarding

Local forwarding brings one defined TCP destination to the client side. Remote forwarding makes a server-side listener connect back toward a client-side destination; it often warrants stricter review because it can create an unexpected inbound path. Dynamic forwarding creates a local SOCKS proxy and can broaden the destinations available to client applications. These are operationally different capabilities, not interchangeable ways of “getting past” a firewall.

PuTTY’s forwarding documentation describes TCP-centric tunnels. A configured forwarding rule should not be assumed to carry arbitrary UDP traffic or transparently protect every application on the computer. An organization that needs multiple subnets or application protocols may be better served by an approved VPN or zero-trust access broker rather than accumulating undocumented one-off forwards.

Monitor, revoke and document

Retain the named service request, the bastion account, forwarded endpoint, implementation date, expiration and test result. Review SSH and destination application logs together when investigating a suspected access problem. Session records should disclose whether the user connected, which forwarding rule was configured and whether the requested service responded, while respecting organizational privacy and retention policies.

When maintenance ends, close the PuTTY session, remove temporary permissions and confirm that the listener no longer exists. A persistent saved PuTTY configuration is not proof of an active network path; verify the current state. The goal is a narrow, attributable administrative connection, not a technique for hiding unapproved traffic behind encryption.

When another access design is better

A recurring multi-user need for an internal application may justify a managed gateway with central identity, conditional access and per-application policy. An occasional administrator performing a controlled task may reasonably use one SSH local forward. Decide based on scale, required protocols, auditability and operations ownership. Properly designed tunneling preserves policy intent while reducing exposure of the protected service.

img