Networking Forums

Networking Forums > Computer Networking > Linux Networking > keeping ssh connection up with two modems?

Reply
Thread Tools Display Modes

keeping ssh connection up with two modems?

 
 
Andy
Guest
Posts: n/a

 
      11-29-2006, 09:29 PM
Hi folks.
In short:
Is it possible to route ssh through two modems with two different ISP's
so that if one ADSL connection goes down, the ssh session stays up?

In long:
At work we use windows and two different modems.
When one connection goes down, a work colleague has written a little
..bat script to swap the default routing to the other modem's private IP.

Obviously, this means that all the ssh sessions we have to numerous
servers are lost, and we have to log into these all over again.

I would love to use linux at work and it is easy enough to automate the
changing of default routing, and this would be fine for web browsing.

However, the ssh sessions need two endpoint public IP's.


Here's the setup.
5 machines each with one NIC all on the same subnet (Private
192.168.IPs) as two modem NAT routers.

Obviously each modem has a different IP on the private subnet, but more
importantly they have different public IPs. This is where I guess the
ssh problem gets tricky.

Is it even possible to use these two modems in a redundant manner so
that the ssh connection stays up?

If so, could someone give us clue how to go about it.. or at least tell
me what this technique is called so I can do some more googling.

Thanks

--
Andy Richardson

Never criticize a man 'til you've walked a mile in his shoes.
After that, you can say what you like..
'cos you're a mile away and you've got his shoes.
 
Reply With Quote
 
 
 
 
David Schwartz
Guest
Posts: n/a

 
      11-30-2006, 05:12 AM

Andy wrote:

> Hi folks.
> In short:
> Is it possible to route ssh through two modems with two different ISP's
> so that if one ADSL connection goes down, the ssh session stays up?


Yes, it is possible. But there is no really great way to do it. If all
the SSH connections are to the same remote network, a VPN is probably
the best way to do it. When one connection is lost, the VPN will break
but you can connect out to re-establish the VPN. The SSH connections
will only notice a small hiccup.

If you need to connect to a variety of remote machines, one solution
might be a proxy that you install on the machine. SSH in, run the
proxy, SSH to the proxy, and dump the original SSH connection. The
proxy would keep an SSH connection right to itself (the remote
machine), accept and authenticate incoming connections, and copy their
data to and from the SSH connection. On your end, you run the matching
proxy that makes outbound connections. You then SSH to your local proxy
which connects to the remote proxy, like a mini-VPN.

Another way would be to set up a VPN to one well-connected remote site.
You SSH to machine on that remote site over the VPN and SSH out from
there. Make the VPN to the well-connected site "redial" on connection
loss.

DS

 
Reply With Quote
 
Andy
Guest
Posts: n/a

 
      11-30-2006, 07:50 PM
Fantastic! that sounds a little like hack #71 in "Linux Server Hacks". I
read about it months ago and your post has just reminded me. The book
was doing something very similar.

I've just gotta get my head around it now.

Cool thanks again.
Andy


--
Andy Richardson

Never criticize a man 'til you've walked a mile in his shoes.
After that, you can say what you like..
'cos you're a mile away and you've got his shoes.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I make connection per rs-232 without modems directly Daneel Yaitskov Linux Networking 2 07-11-2008 05:37 PM
Keeping the wireless connection after logging off a.bechetoille@gmail.com Wireless Internet 0 03-12-2007 05:31 PM
Problem Keeping Connection to switch =?Utf-8?B?VGVv?= Broadband Hardware 1 07-07-2005 11:53 PM
wireless newbie in distress. problems keeping a connection wd Wireless Internet 12 05-06-2005 12:56 PM
Keeping connection issues Rebecca Wireless Networks 0 01-13-2005 12:31 PM



1 2 3 4 5 6 7 8 9 10 11