Silent Bridges: Firewall Evasion with SSH and PuTTY Tunneling
An SSH tunnel can provide a useful, encrypted route to an administrative service that should not be exposed directly to the internet. But its purpose is not to make a firewall decision disappear. A tunnel changes where a connection enters a network, who can initiate it and which host opens the connection at the other end. Those changes need the same authorization and scrutiny as any other access path.
That distinction gets lost when SSH forwarding is described as a universal method for bypassing blocked ports. An SSH connection is not guaranteed to be allowed through a firewall, its encrypted segment does not necessarily cover traffic beyond the SSH server, and an administrator’s ability to log in does not automatically authorize reaching every service behind it. The practical task is to design a narrow, reviewable forwarding arrangement and prove that it behaves as intended.
Before choosing PuTTY or typing an SSH option, identify the exact service to be accessed and the network boundary that currently protects it. A database administration interface on a private subnet is a different requirement from general-purpose browsing through a remote proxy. The first may warrant a temporary, host-specific forward under an approved change; the second can route requests to destinations the organization has never assessed.
The official OpenSSH forwarding options describe encrypted connections and local, remote and dynamic forwarding. It does not claim that an SSH tunnel automatically satisfies the policy of the networks it crosses. At minimum, the operator needs permission to connect to the SSH endpoint, permission to use forwarding on that endpoint and permission to access the final service. The destination service may impose its own authentication and authorization after the forwarded TCP connection is established.
Write that approval in concrete terms: requesting user or role, managed client, SSH server, permitted internal destination and port, operational purpose, duration, data sensitivity and owner who can revoke it. Do not use the phrase “firewall exception” as a substitute for that list. If the design depends on an administrator reaching an unrestricted external SSH server to circumvent the employer’s egress policy, it is not a sound substitute for an approved access architecture.
An SSH gateway also changes the viewpoint from which the destination is reached. A firewall between the administrator’s laptop and the gateway may see the SSH session rather than the inner application protocol; a firewall between the gateway and the destination still sees a connection originating on that side. Encryption protects the SSH hop, not an arbitrary series of later network hops. If the forwarded target expects HTTPS, its own TLS verification still matters.
SSH forwarding has three common TCP arrangements. The PuTTY forwarding modes distinguish local forwarding, remote forwarding and dynamic SOCKS proxying. The important difference is not which radio button is easier to find; it is where a listening socket appears and who can connect to it. PuTTY’s dynamic SOCKS implementation carries supported TCP connections, not arbitrary UDP traffic or every packet emitted by the computer.
| Arrangement | Where the listener is | Boundary to examine |
|---|---|---|
| Local forwarding | Client computer, normally loopback unless explicitly exposed | Which remote destination the SSH server can reach, and whether another local process can use the listener |
| Remote forwarding | SSH server side, normally loopback on OpenSSH unless policy permits a broader bind | Which remote users or hosts can reach a local-side service, and whether the reverse connection is authorized |
| Dynamic forwarding | Client-side SOCKS listener | Which SOCKS-aware applications and destinations are allowed; it is not a device-wide anonymity mechanism |
For access to one known internal service, local forwarding is often easier to restrict and explain. Remote forwarding can be legitimate for a narrowly controlled support or callback workflow, but creates a different exposure question: a server-side listener may grant access back toward the client’s environment. Dynamic forwarding should not be approved merely because it avoids listing individual destinations. Its flexibility is precisely why destination controls and monitoring deserve more attention.
These descriptions are TCP-forwarding behavior, not a claim that the technology itself provides a virtual private network with the same routing, DNS or UDP coverage as a managed VPN. Neither the appearance of a localhost URL nor a successfully authenticated SSH session proves the connection is private from every party or free of downstream exposure.
Consider a fictional operations team, Eastbank Services, that needs to inspect an internal inventory dashboard during a scheduled maintenance window. The dashboard is reachable only from an approved bastion host; it already requires its own application login and HTTPS. The access owner approves one administrator, one bastion, one dashboard destination, a short maintenance period and a local listener available only to that administrator’s workstation.
In PuTTY, the relevant controls are in the PuTTY Tunnels panel. The approved operator would select a local forward, use a loopback-bound source port on the managed workstation, specify the approved dashboard host and port as the destination, add the forward, and only then connect to the verified SSH server. Saving a PuTTY session can preserve the mapping, but a saved mapping must not outlive the business approval or become a reusable shortcut into other environments.
An equivalent illustrative OpenSSH command for an authorized test might be ssh -N -L 127.0.0.1:9443:dashboard.internal.example:443 operator@bastion.example. These are reserved example hostnames, not real systems or a tested configuration. The explicit 127.0.0.1 bind limits which local interfaces accept connections; the named destination and port state what the bastion will attempt to reach. The command does not by itself grant server-side forwarding permission or dashboard authorization.
The dashboard’s certificate is a separate trust check. Accessing a service as localhost:9443 can change the HTTP hostname and TLS certificate validation context. Do not suppress browser certificate warnings to make the demonstration seem successful. Use an approved hostname-preserving method or a locally documented application configuration that maintains the correct service identity. Success means the authenticated administrator reaches the intended dashboard securely, not simply that a socket accepts a connection. Eastbank’s example is a planning exercise; no bastion, PuTTY session, server policy, TLS certificate, incident or customer system has been inspected. A real organization would also decide whether session duration, reauthentication, device posture or change-ticket checks are required by its own controls.
Client-side instructions are not the security boundary. The operator could change a local port mapping, load a different saved session or run a different SSH client. Where OpenSSH is the server, its server-side forwarding controls include AllowTcpForwarding, PermitOpen, PermitListen, GatewayPorts and DisableForwarding. Together with account restrictions, they can narrow which type of forwarding is accepted, where connections may be directed and whether a remote listener may bind beyond loopback. These settings are not interchangeable: restricting a destination does not automatically restrict where a remote listener is exposed.
For especially constrained access, OpenSSH also documents per-key forwarding restrictions such as permitopen, permitlisten and no-port-forwarding. A key dedicated to a narrow administrative workflow need not carry unrestricted shell, forwarding and agent capabilities. The actual restriction set must be evaluated against the server version, account behavior, key provisioning process and organizational access model rather than copied unexamined from an internet example.
There is an important limitation: OpenSSH’s own manual warns that disabling TCP forwarding is not a complete security control if the same user still has shell access and can launch an alternate forwarding program. Server policy must be paired with bounded user permissions, destination firewall policy and appropriate service authorization. That is why “SSH allows only port 22” is not an accurate definition of a permitted network pathway: one authenticated connection can carry other application connections when the relevant permissions exist.
For Eastbank, the defensible control is not “let administrators use SSH.” It is an approved account or role whose forwarding destinations are constrained to the inventory service, whose remote exposure is restricted, and whose approval can be revoked when maintenance ends. If the server lacks the configuration capability to enforce the promised boundary, the proposed access design needs revision before it is adopted.
Encryption is useful only when it terminates at the server the administrator intended to contact. PuTTY’s host-key verification explains that an unfamiliar host-key fingerprint should be verified through a trusted route and that an unexpected key change can indicate a server replacement or interception attempt. Accepting every fingerprint prompt without checking it undermines the authenticated endpoint on which the forwarding design depends.
Public-key authentication and host-key verification serve different purposes. The first helps the server decide whether to accept the user; the second helps the user determine whether the server is legitimate. A correct private key cannot compensate for trusting the wrong SSH server. Likewise, a verified bastion does not authenticate the HTTPS application beyond it.
Forwarding an SSH authentication agent introduces another decision. The Pageant agent-forwarding security model and OpenSSH documentation discuss the convenience and risk of allowing remote sessions to request operations using local agent-held identities. Private key material need not be copied for a compromised remote host to misuse available authentication operations. Do not enable agent forwarding as a routine accompaniment to TCP port forwarding. Use a separate approved access path, with appropriate key restrictions or a dedicated jump-host arrangement, where the job actually needs it.
An SSH tunnel also should not be described as “invisible.” Network administrators can observe connections to the SSH endpoint, time, duration and volume subject to their instrumentation. They may not be able to read the encrypted application payload on that segment, but encryption is not proof of anonymity, nonattribution, a clean destination or immunity from traffic policy. For incident review, the system owner should distinguish what the SSH server logs from what the application and intervening firewalls actually log.
A test that pings the SSH server proves very little about port forwarding. ICMP reachability to the bastion does not confirm that a TCP listener was created, that the SSH server is permitted to open the approved destination, or that the application is working. Even seeing “local port forwarding” in a client event log establishes only part of the path. A forwarded listener may exist while the target service refuses the connection.
OpenSSH’s ExitOnForwardFailure setting tells the client to terminate an SSH session if the requested forwarding listeners cannot be established. It explicitly cautions that this setting does not detect later failures connecting to the ultimate destination. That distinction makes it unsuitable as the sole service-health check, although it can prevent an operator from assuming that a requested listener was successfully installed.
| Question | Authorized test evidence | What it cannot establish alone |
|---|---|---|
| Did authentication reach the right host? | Verified SSH host key and successful approved user authentication | That forwarding or downstream service access is permitted |
| Did the listener bind where intended? | Client event log and a local socket/interface inspection | That a different local user or another interface cannot use an unintended listener |
| Can the intended application be reached? | Successful application-specific request and correct end-service identity | That every operation is authorized or that TLS warnings are harmless |
| Does policy reject out-of-scope access? | Controlled failed test for a disallowed destination or remote bind | That every alternative path from a shell-enabled account is closed |
| What happens when the tunnel ends? | Listener disappearance, session closure and verified loss of temporary access | That prior application tokens, credentials or logs were automatically revoked |
Use an authorized test system, not a production outage, to validate negative cases. The owner should record test time, versions, relevant policy, approved destination, expected result, observed result and unresolved exceptions. The ability to connect should not be presented as proof that the design meets an organization’s audit, retention or regulatory obligations.
Even a narrowly approved forward can become a permanent dependency if saved sessions proliferate. An internal service may move, a bastion may be replaced, a key may be reassigned, or the original business need may disappear. Treat tunnels as managed access pathways: inventory them, name an owner, limit duration, confirm the destination after changes and remove obsolete listeners and credentials.
Software currency is also part of the boundary. The PuTTY 0.85 release, dated August 16, 2026, is the current public release at this review checkpoint. The exact release should be checked again when the article is independently reviewed, because an editor cannot prove that a future installation is current simply by reading an October 2026 draft. OpenSSH package versions likewise vary by operating system; follow the distribution’s security-update and configuration-testing processes rather than assuming every host has the same defaults.
Successful SSH encryption does not automatically provide a record of every HTTP request, database operation or administrative decision taken through the forwarded service. Preserve appropriate authentication, bastion and application audit evidence without inventing packet visibility that the encryption boundary does not allow. When forwarding is disallowed, investigate policy and permission rather than trying another port or proxy solely to evade enforcement.
The durable lesson is that SSH port forwarding is a conditional capability, not an all-purpose firewall bypass. Local, remote and dynamic forwarding each change the route and the set of parties that may connect. A sound design names a legitimate service, uses a verified SSH endpoint, limits the allowed destination and listener, preserves the application’s own identity and access controls, and tests both success and refusal. If an operator cannot identify who authorized the path or how to turn it off, the tunnel is not ready for production.