SSH Tunneling-Port Forwarding
SSH Local Port Forwarding
It is the method used in SSH to forward the ports of application from a client machine to the server machine. By making use of this, the SSH client listens for connections on a port which has been configured, and tunnels to an SSH server when a connection is received. This is how the server connects to a destination port which is configured and is present on a machine other than the SSH server.
ssh -L 8081:localhost:8080 -N -f -l USER TARGET_IPForward connections
Port forwarding command example:
ssh -L 8000:127.0.0.1:80 user@172.16.1.5 -fNThe flags mean:
Dynamic and Local Tunneling command example:
ssh -D PORT user@172.16.1.5 -fN (Dynamic SSH Tunneling)
ssh -L PORT TARGET_IP:TARGET_PORT USER@VICTIM@IP (Local SSH Tunneling)Alternate Method: Manual Configuration
Last updated