1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Port forwarding with ssh in Debian

Discussion in 'Linux & Open Source' started by Bat, 14 Jan 2006.

  1. Bat

    Hitman

    Joined: 19 Oct 2002

    Posts: 986

    Hi all,

    Is it possible to forward all traffic through a remote host using ssh easily?

    Basically I am trying to run Skype on a windows machine on one network and tunnel the outgoing and incoming traffic through a Debian server on a different network.

    Any thoughts?

    Cheers,
     
  2. Berserker

    Man of Honour

    Joined: 4 Nov 2002

    Posts: 15,454

    Location: West Berkshire

    I'm not sure what the networking requirements are for Skype. Tunneling to another LAN is easy, and I regularly tunnel things like VNC. I also tunnel HTTP sometimes, but I've got a squid proxy set up to handle that, so it's still LAN to LAN.

    LAN to LAN to internet is a little harder. You'll need to do something like this:

    1. Set up a local port forward on the Windows box to send data to the Debian box. This is easy enough in the PuTTY client on Windows.
    2. Set up something on the Debian box so it will act as a proxy (it's no good the Debian box getting the data if it doesn't know what to do with it). This may be the hardest part, but you can probably do it with some iptables rules (maybe some use of NAT might help). Not something I've done myself.
    3. Tell Skype to connect to the local port. Don't know how to do that either as I've not used Skype.
    Hope this gives you somewhere to start. :)
     
  3. Bat

    Hitman

    Joined: 19 Oct 2002

    Posts: 986

    Thanks very much mate. Some useful info there. I will have a bash(get it?!? :rolleyes: :D ).
     
  4. M0KUJ1N

    PermaBanned

    Joined: 17 Mar 2004

    Posts: 1,486

    Location: Edinburgh

    Found a (pretty much) step-by-step guide, although it is based on a situation where the Windows machine is connected directly to the internet.

    http://www.rico-wind.dk/

    Still should give you a head start with the client setup side of things :)
     
  5. Bat

    Hitman

    Joined: 19 Oct 2002

    Posts: 986


    Mate, thats excellent. Thanks.