Port Redirection and Tunneling
SSH Local Port Forwarding
On Attacker Machine:
Use the following command to establish local port forwarding:
Replace
localhost
,local-port
,target
,remote-port
,user
, andmediator
with appropriate values.This redirects traffic from the local machine's
local-port
to thetarget:remote-port
through themediator
machine.
SSH Remote Port Forwarding
On Victim Machine:
Use the following command to establish remote port forwarding:
Replace
8080
,127.0.0.1:80
,kali
, and192.168.1.15
with appropriate values.This redirects traffic from the victim machine's
127.0.0.1:80
to the attacker's machine on port8080
.
SSH Dynamic Port Forwarding
Use the following command to establish dynamic port forwarding:
Replace
8080
,user
, andip
with appropriate values.This creates a dynamic SOCKS proxy on the local machine, redirecting traffic through the specified SSH server.
Last updated