mardi, septembre 01, 2015

REDIRECT TRAFFIC : DOUBLE TUNNEL SSH



REDIRECT TRAFFIC : DOUBLE TUNNEL SSH


ssh -L PORT1:HOST2:PORT2 -N HOST1

It will listen connection on localhost:port1 redirect traffic through host1 (so you will need an account on host 1 -but not on host2-) and finally redirect traffic to host2:port2

example
from your localhost:9999 through 192.168.0.50 to 192.168.0.70:32400


ssh -L 9999:192.168.0.70:32400 -N 192.168.0.50


Other more secured methods : http://superuser.com/a/97007/486518
French tutorial : http://www.linux-france.org/prj/edu/archinet/systeme/ch13s04.html