LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 10-04-2004, 06:00 PM   #1
Registered: Dec 2003
Location: Northern VA
Posts: 493

Rep: Reputation: 30
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 :-\
Old 10-04-2004, 06:07 PM   #2
Registered: Dec 2003
Location: Northern VA
Posts: 493

Original Poster
Rep: Reputation: 30
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
SSH-Tunnels, Firewall, VNC bojo Linux - Security 3 03-16-2006 05:08 AM
Server Defined SSH Tunnels dlublink Linux - Software 1 09-29-2005 08:11 PM
SSH tunnels and VNC, yet again. Edaph Linux - Security 7 05-23-2004 09:55 AM
Creating a Network without having a router Nukem Linux - General 5 12-30-2003 06:24 PM
Automatic SSH Tunnels fearofcarpet Linux - Software 1 12-04-2003 11:36 PM

All times are GMT -5. The time now is 08:23 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration