Reverse SSH tunnel in plain english...

Those tutorials explaining reverse SSH tunnels are ambiguous at best in their examples, often using the same port number twice, making it unclear whether it is a local port or a remote port.

Yes, I'm done complaining, here's my attempt at being helpful:

MASTER_PORT=22 # likely
MASTER_USER=root # not really!
MASTER_LISTEN=... # whatever you want your public port to be
TARGET_HOST=192.168.... # probably some local server
TARGET_PORT=25 # let's imagine we tunnel a mailserver

# let's actually do something now!

Please ensure the line 
   GatewayPorts yes
exists in the file
or your tunnel will bind to localhost only.

As you can see, the order of parameters is not quite intuitive, which might have brought you on this page in the first place. Enjoy.

No comments:

Post a Comment