From owner-freebsd-hackers Sat Feb 16 0:47:25 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from rwcrmhc51.attbi.com (rwcrmhc51.attbi.com [204.127.198.38]) by hub.freebsd.org (Postfix) with ESMTP id D094937B405 for ; Sat, 16 Feb 2002 00:47:22 -0800 (PST) Received: from blossom.cjclark.org ([12.234.91.48]) by rwcrmhc51.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020216084722.VMCM2626.rwcrmhc51.attbi.com@blossom.cjclark.org>; Sat, 16 Feb 2002 08:47:22 +0000 Received: (from cjc@localhost) by blossom.cjclark.org (8.11.6/8.11.6) id g1G8lLI42602; Sat, 16 Feb 2002 00:47:21 -0800 (PST) (envelope-from cjc) Date: Sat, 16 Feb 2002 00:47:21 -0800 From: "Crist J. Clark" To: "Michael R. Wayne" Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: Odd ipfw behaviour Message-ID: <20020216004721.B36782@blossom.cjclark.org> References: <200202152309.SAA00831@manor.msen.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200202152309.SAA00831@manor.msen.com>; from wayne@staff.msen.com on Fri, Feb 15, 2002 at 06:09:51PM -0500 X-URL: http://people.freebsd.org/~cjc/ Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Feb 15, 2002 at 06:09:51PM -0500, Michael R. Wayne wrote: [snip] > Using this ipfw rule on ProxyFirewall: > fwd $(squid-box) log tcp from $(windows-box) to any 80 > and checking the logs on ProxyFirewall, I see this horrible mess: > > ipfw: 11005 Forward to SQUIDbox TCP BROWSERbox:1631 216.136.204.21:80 in via fxp1 > ipfw: 11005 Forward to SQUIDbox TCP BROWSERbox:1631 216.136.204.21:80 out via fxp0 <---!!! > ipfw: 11005 Forward to SQUIDbox TCP BROWSERbox:1631 216.136.204.21:80 in via fxp1 > ipfw: 11005 Forward to SQUIDbox TCP BROWSERbox:1631 216.136.204.21:80 out via fxp1 > ipfw: 60000 Deny ICMP:5.1 ProxyFirewall BROWSERbox out via fxp1 > ipfw: 60000 Deny ICMP:5.1 ProxyFirewall SQUIDbox out via fxp1 > last message repeated 31 times > > This, of course, causes terrible performance as the packets destined > for the local net bounce out the default interface. It can be > corrected by specifying an interface in the fwd rule: > fwd $(squid-box) log tcp from $(windows-box) to any 80 via fxp1 > > Is it expected behaviour for ipfw to disregard routing and put > packets out on interfaces where they have no chance of being properly > delivered (which would be odd) or is this a bug? I believe you are misinterpretting the logs. Each of those log entries is saying, "At rule 11005 I am forwarding this packet to SQUIDbox. The packet that triggered this rule was TCP BROWSERbox:1631 216.136.204.21:80 that came (out of|into) to the firewall via interface (fxp0|fxp1)" That is, the 'via fxp?' at the end is telling you about the packet that _triggered_ the rule, not where the packet was actually forwared to. If you sniffed the connection, I expect that you would have seen four packets go from the firewall to SQUIDbox. -- Crist J. Clark | cjclark@alum.mit.edu | cjclark@jhu.edu http://people.freebsd.org/~cjc/ | cjc@freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message