Back to All Modules

Port Forwarding Techniques

#Overview

Port forwarding forwards a single port or specific service through a compromised host. This is simpler and stealthier than a full SOCKS proxy when you only need to reach one service — less traffic, fewer logs, and no SOCKS configuration needed.

For basic SSH -L/-R and netsh portproxy, see 07 - Post-Exploitation. This section extends with advanced configurations, ProxyCommand/ProxyJump, iptables NAT, and Metasploit routing.

#Quick Selection

NeedToolFile
Forward a port with SSHssh -L / ssh -RSSH Port Forwarding
Forward without SSHsocat / netsh / iptablesNative Port Forwarding
Route through Meterpreterautoroute / portfwdMetasploit Routing

#Technique Files

FileCoversComplexity
SSH Port Forwarding-L/-R advanced, ProxyCommand, ProxyJump, autosshMedium
Native Port Forwardingsocat, netsh, iptables DNAT/SNATLow-Medium
Metasploit Routingautoroute, route add, socks_proxy, portfwdMedium

#Cross-References