From owner-freebsd-security Tue Sep 17 22:51: 3 2002 Delivered-To: freebsd-security@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DF0D737B401 for ; Tue, 17 Sep 2002 22:51:00 -0700 (PDT) Received: from smtp.comcast.net (smtp.comcast.net [24.153.64.2]) by mx1.FreeBSD.org (Postfix) with ESMTP id 584A243E77 for ; Tue, 17 Sep 2002 22:51:00 -0700 (PDT) (envelope-from dfolkins@comcast.net) Disposition-notification-to: dfolkins@comcast.net Received: from groovy3xp (pcp01731796pcs.selrsv01.pa.comcast.net [68.83.131.193]) by mtaout02.icomcast.net (iPlanet Messaging Server 5.1 HotFix 1.4 (built Aug 5 2002)) with SMTP id <0H2M0032T7W9GA@mtaout02.icomcast.net> for freebsd-security@FreeBSD.ORG; Tue, 17 Sep 2002 23:48:09 -0400 (EDT) Date: Tue, 17 Sep 2002 23:48:01 -0400 From: dfolkins Subject: Re: Unexpected keep state behaviour in ipfw To: freebsd-security@FreeBSD.ORG Message-id: <001601c25ec6$2fd4dc90$0a00a8c0@groovy3xp> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Mailer: Microsoft Outlook Express 6.00.2600.0000 Content-type: text/plain; charset=utf-8 Content-transfer-encoding: 7BIT X-Priority: 3 X-MSMail-priority: Normal References: <20020915224154.GD495@gsmx07.alcatel.com.au> <001a01c25e17$39edcde0$0a00a8c0@groovy3xp> <20020917210004.GW495@gsmx07.alcatel.com.au> Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org > net.inet.ip.fw.dyn_ack_lifetime is a tradeoff between keeping active > connections alive and minimising the impact of massive numbers of > dynamic rules. I also feel that 300 seconds is too short (note that > IPFilter uses 120 hours, which I think is far too long). My problem > is that the connections are being dropped after less than > net.inet.ip.fw.dyn_ack_lifetime seconds of idle time. I have tried > juggling net.inet.tcp.keepidle, net.inet.tcp.keepintvl and > net.inet.ip.fw.dyn_ack_lifetime so that the latter is longer than > the former (in ipfw) and this still didn't work. It would appear > that the dynamic rule timers are never being reset. > > >as to why your ssh connection stays alive even through the night - i > >suspect that is because your ssh server on your firewall has a > >configuration setting that makes it send keep-alives, i.e. your > >clientaliveinterval in sshd_config is set to some value which is less > >than your net.inet.ip.fw.dyn_ack_lifetime value. > > Nope. I'm using the default ClientAliveInterval value (ie disabled). > > Based on comments in another thread here, I suspect the underlying > problem is that ipfw dynamic rules don't work with ipnat. (Though > I don't understand why - ipnat should be invisible to ipfw). My > ssh connectins remain working courtesy of either normal or ipfw2 > keepalives (since that connection isn't NAT'd). > well, given this description, i guess maybe you are right, and its having problems with ipnat. i had some problems with natd/ipfw myself (cf recent thread in -security), so its possible ipfw doesnt behave well with ipnat either. maybe the solution is to switch to ipfilter after all... sorry i couldnt be more helpful. -- dfolkins To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message