Re: How to prevent or quickly fix hosed ssh tunnels

From: all mail refused (elvis_at_notatla.org.uk)
Date: 01/25/05


Date: 25 Jan 2005 19:07:08 GMT

In article <CswJd.9210$_B3.2424@newssvr31.news.prodigy.com>, Thursday wrote:

>I have a couple of ssh tunnels going out from my adsl gateway to a
>hosted server with static ip.
>
>When the dynamic ip address is reassigned by the ISP on the gateway
>(unpredictable intervals), the ssh tunnel gets hosed.

I'd say your ISP has no business changing your IP while you have
running connections.

>When I kill the ssh tunnel processes (kill or kill -9), the ssh tunnels
>lingers with a FIN1_WAIT (spelling?) status for a long time before
>eventually disappearing.

FIN_WAIT_1 is part of the normal close for a client - and if the
IP has changed that's unavoidable because you won't be getting
a FIN. See the TCP state diagram in TCP/IP Illustrated.
The reason it lingers is that you're not getting an ACK or a
FIN from your peer.

>What can I do to minimize downtime to < 5 seconds? Is it possible to
>kill the ssh process and *quickly* get rid of the hosed tunnel?

Why do you think any action is needed ?

-- 
Elvis Notargiacomo  master AT barefaced DOT cheek
http://www.notatla.org.uk/goen/
    7.031: OnACPower returned value( 0x1 ) which is Equal To 0x1