From owner-freebsd-ipfw Wed Nov 27 6:20:56 2002 Delivered-To: freebsd-ipfw@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0073737B401 for ; Wed, 27 Nov 2002 06:20:55 -0800 (PST) Received: from gs166.sp.cs.cmu.edu (GS166.SP.CS.CMU.EDU [128.2.205.169]) by mx1.FreeBSD.org (Postfix) with SMTP id 849C043EA9 for ; Wed, 27 Nov 2002 06:20:54 -0800 (PST) (envelope-from dpelleg@gs166.sp.cs.cmu.edu) To: freebsd-ipfw@freebsd.org Subject: IPFW2 keepalives only work in one direction? From: Dan Pelleg Date: 27 Nov 2002 09:20:46 -0500 Message-ID: Lines: 29 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-ipfw@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'm trying to track down a problem with IPFW2 where stateful connections time out. net.inet.ip.fw.dyn_keepalive is set to 1. This a host that can SSH out and also accepts incoming SSH connection. The relevant rules are: allow tcp from ${friendlynet} to me dst-port 22 setup allow tcp from me to any keep-state What I'm noticing is that: - if I ssh out, IPFW2's keepalives will keep the connection alive (the timeout counter on it will jump up if the connection is left idle) - if I ssh *in*, the connection will be made, but will time out if left idle. Now, if the following two rules are changed to: allow tcp from ${friendlynet} to me dst-port 22 setup keep-state allow tcp from me to any keep-state then neither type of connection times out. What's going on? I understand that in the first configuration the stateful rules are associated with the second rule (since they're generated by the reply packet). But still - the dynamic rule is installed, so ipfw should keep it alive just the same, no? This is -STABLE as of Nov. 16 -- Dan Pelleg To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message