Re: tcp_keepalive

Barry Schiffman <[email protected]> Sun, 24 Apr 2005 11:11:59 -0700 (PDT)
Newsgroups gmane.os.opendarwin.general
Message-ID <[email protected]>
Thanks! That did it. But one detail:

Running sysctl doesn't save the new values for when I
next reboot, does it?

>From what I've found on the web for BSD, there should
be a /etc/sysctl.conf, but there's not. (I'm running
the Mac OS, so maybe darwin and Mac don't overlap
here.)

And if this helps anyone I put

net.inet.tcp.keepidle -> 8000
net.inet.tcp.keep -> 100
net.inet.tcp.keep -> 100

I arrived at these by extrapolating from values that
work on my Redhat machines. They are perhaps low, and
I'll experiment with them sometime.

Barry

--- Rob Braun <[email protected]> wrote:
> From an application level, the following values in
> sshd_config
> affect keepalives:
> KeepAlive yes
> ClientAliveInterval 30
> ClientAliveCountMax 999999
> See the sshd_config(5) man page for documentation.
> 
> Alternatively, you can set it in the client side
> ssh_config:
> KeepAlive yes
> See the ssh_config(5) man page for documentation.
> 
> Additionally, you can set things globally by
> modifying kernel
> sysctl values:
> net.inet.tcp.keepidle: 144000
> net.inet.tcp.keepintvl: 1500
> net.inet.tcp.keepinit: 1500
> net.inet.tcp.always_keepalive: 0
> 
> Rob
> 
> On Sat, Apr 23, 2005 at 02:10:00PM -0700, Barry
> Schiffman wrote:
> > Can someone tell me how I can change the
> tcp_keepalive
> > values? I assume that darwin and the Mac OS
> overlap
> > here. 
> > 
> > I need to change these to stop my DSL router from
> > dumping my ssh connection after 10 minutes. I can
> do
> > this in Redhat by changing the values in the three
> > ipv4 tcp_keepalive files, but clearly the details
> are
> > different here.
> > 
> > Thanks in advance
> > 
> > 


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com