Ssh/tunnel
Aus SchnallIchNet
socks proxy
ssh enables me to simply create an ssh-tunnel which provides a socks proxy.
this is really simple!
ssh protocoll version 2 is needed but should prefered anyway... ;-)
ssh [-f] -N -D[ip:]1080 <username>@my.sshenabled.really.huge.bandwith.connected.host.tld
where:
- -f run in background, otherwise ssh runs in foreground...
- -N says sshd not to start any application on destination host
- -D specifies the port to use on the local host (1080)
- if you do not specify an IP of your local system, localhost (127.0.0.1) is used...
- keep in mind, that you need to be root to allocate well-known-ports
portbased tunnel
TODO: Mach et schoen!! ;-)
beispiel: ========= csteidl@koblenz$ ssh -L 10.10.11.254:3389:192.168.102.50:3389 -f -N root@213.221.106.43 allgemeine syntax: ================== ssh -L [lokaler_host:]lokaler_port:dst_host:dst_port -f -N user@ssh_host erklaerung: =========== beim aufbau eine remotedesktop verbindung an 10.10.11.254:3389 wird dann die verbindung von 213.221.106.43 (192.168.102.40) an 192.168.102.50:3389 weitergeleitet, wobei _nur_ der server 213.221.106.43 verbindung zum server 192.168.102.50 hat. koblenz ssh_host (NAT) ssh_host (real) 10.10.11.254 ---> FW:213.221.106.43:22 ---|1:1 nat|---> 192.168.102.40:22 | | 3389 | | v 192.168.102.50 (win) dst_host