There are three types of SSH port forwarding:
- Local Port Forwarding. – Forwards a connection from the client host to the SSH server host and then to the destination host port.
ssh -L [LOCAL_IP:]LOCAL_PORT:DESTINATION:DESTINATION_PORT [USER@]SSH_SERVER - Remote Port Forwarding. – Forwards a port from the server host to the client host and then to the destination host port.
- Dynamic Port Forwarding. – Creates a SOCKS proxy server that allows communication across a range of ports.