LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Creating a router out of SSH Tunnels. (https://www.linuxquestions.org/questions/linux-networking-3/creating-a-router-out-of-ssh-tunnels-238804/)

Technoslave 10-04-2004 06:00 PM

Creating a router out of SSH Tunnels.
 
Basically, what I'm looking for are the right command line arguments to setup a 3 box VPN network with the middle box acting as a router.

Box1 wants to scp to Box3 but wants to go through Box2

I'm basically using Box2 as a router, the reason being is that my current download speeds from Box1 to Box3 is about 70K/s, and the downloads from Box1 to Box2 is 180K/s and from Box2 to Box3 is 180K/s. So, there's something wrong ( more than likely at a peering point ) that is causing my bad dl speeds from Box1 to Box3, but I can create my own routing via Box2. Now, just how to implement?

I've tried several -L -R type variants but those are all a no go, I think I might just be doing something wrong and was hoping someone else might be able to figure it out. Basically, what I want to do is:

ssh -p 1024 Box2

And what it will do is actually ssh me in to Box3

That's all, pretty simple, but too hard for me :-\

Technoslave 10-04-2004 06:07 PM

Ug, big slacker I am, and this is how it always is. I come here to ask one of those weird questions that no one ever answers but I eventually figure it out.

Anyway, to basically use Box2 as a router this is what I did.

On Box2: ssh -f -N -L 1024:Box3:22 Box3
On Box1: ssh -f -N -L 1024:Box2:1024 Box2

On Box1: ssh -p 1024 Box1(localhost)
Command Prompt Line of Box3#

Ta-Da ... oh well :-D Thanks all the same.


All times are GMT -5. The time now is 10:03 PM.