OpenSSH dynamic port forwarding

Jul 17, 2006 0 Replies

Hi guys, I have this problem. At work I am behind firewall but there is a server that's outside out trusted network. Thing is, that I cannot connect to this server (called "server2") directly, I have to do it through another server (called "server1"). I managed to set static port forwarding for IRC for example.



ssh -f -L 5551:localhost:5551 user@server1 ssh -f -L



5551:localhost:5551 user@server2 ssh -f -N -L
5551:efnet.demon.co.uk:6667 user@localhost

Then if I connect to localhost:5551 in my IRC client, it is forwarded to efnet.demon.co.uk:6667. This works just fine. Problem is how to set connection for FTP or BitTorrent, which use more than one port. Is possible to set Dynamic Port Forwarding (ssh -D port ...) same way as this static port forwarding? Through two servers?



I'd really appreciate some tips.



Thanks a lot.



Peter



Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required