DragonFly BSD
DragonFly users List (threaded) for 2010-12
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: Connection reset by peer (ssh)


From: Pierre Abbat <phma@xxxxxxxxxxxxx>
Date: Fri, 10 Dec 2010 00:01:55 -0500

On Thursday 09 December 2010 23:32:22 Matthew Dillon wrote:
>     If one side of a connection thinks the connection has failed and
>     closes it and the other side does not and is idle, then later on
>     when network connectivity is restored if the other side tries to
>     send something the first side will go 'say what?' and send a RST.

That wouldn't explain what happened, because my connection had Firefox on it 
with both my bank and some Google Docs open. Both of those connect from time 
to time to their web servers. root's connection was idle and stayed up; mine 
was busy and reset.

>     This case also occurs quite often with idle tcp connections over
>     NATted network links.  NAT will timeout an idle tcp connection
>     after a period of time (depends on the NAT implementation, which
>     is typically part of your cable/dsl modem or wireless router).
>     This can be solved by forcing TCP keepalives to occur much more often
>     than they normally do by setting sysctl net.inet.tcp.keepidle
>     to 75000 (75 seconds) instead of 7200000 (2 hours).  The cost of
>     course is more traffic over your network link.

The connection is direct on the LAN. I have a script "sshforward" on dogla 
(modified from the one I had on previous laptops) which connects to chausie 
and forwards some ports. It used to connect to the outside address, meaning 
it was NATting through the router, and sometimes got broken pipe errors, but 
now if I'm at home with the laptop, it connects directly. The connection from 
chausie to dogla, which I was using in this instance, has always been direct.

Anyway I have set net.inet.tcp.keepidle and I'll see what happens.

Pierre
-- 
I believe in Yellow when I'm in Sweden and in Black when I'm in Wales.



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]