PORT FORWARDING / TUNNELING
Port forwarding / Tunneling ??
Tunneling, also known as "port forwarding is Simplest type of traffic redirection, consists on accepting traffic from one address and port port and redirecting it to another address and port.
It can be useful to bypass address and port based filters. Rinetd is a linux tool to do it.
Local port forwarding ??
Creates an encrypted tunnel through two machines and have traffic redirected to a final host and port, similar to port forwarding This is useful when you are trying to connect from your machine to a destination using a gateway.
Remote port forwarding ??
It creates a tunnel from the target machine to your local machine, which allows connecting to an arbitrary port on the target.
Useful if the target is in a non-routable network from your local machine.
This is useful when you are trying to connect to a host, behind a firewall that blocks incoming connections.
This technique works as the previous one, but the connection is started from the gateway.
Dynamic Port Forwarding ??
Allows to create a tunnel from the target to your machine, and have the traffic routed to any host through target.
You can configure a local port to forward traffic to multiple destinations passing through a single host.
It is similar to local port forwarding but allows multiple destinations.
It uses the SOCKS protocol.
The connection of the previous command is established at port 22 of remote addr.
What is the difference between local and remote port forwarding?
Local port forwarding: connections from the SSH client are forwarded via the SSH server, then to a destination server.
Remote port forwarding: connections from the SSH server are forwarded via the SSH client, then to a destination server.
COMMANDS
Last updated