From owner-freebsd-net@FreeBSD.ORG Fri Jul 30 11:30:00 2004 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 548FE16A4CE for ; Fri, 30 Jul 2004 11:30:00 +0000 (GMT) Received: from ns2.alphaque.com (ns2.alphaque.com [202.75.47.153]) by mx1.FreeBSD.org (Postfix) with SMTP id 000F943D4C for ; Fri, 30 Jul 2004 11:29:58 +0000 (GMT) (envelope-from dinesh@alphaque.com) Received: (qmail 3463 invoked by uid 0); 30 Jul 2004 11:29:56 -0000 Received: from lucifer.net-gw.com (HELO prophet.alphaque.com) (202.75.47.153) by lucifer.net-gw.com with SMTP; 30 Jul 2004 11:29:56 -0000 Received: from localhost (localhost.alphaque.com [127.0.0.1]) by prophet.alphaque.com (8.12.11/8.12.9) with ESMTP id i6UBECWg070036; Fri, 30 Jul 2004 19:14:12 +0800 (MYT) (envelope-from dinesh@alphaque.com) Date: Fri, 30 Jul 2004 19:14:12 +0800 (MYT) From: Dinesh Nair To: Jeremie Le Hen In-Reply-To: <20040728232352.GB8838@tuileries.epita.fr> Message-ID: <20040730191015.W483-100000@prophet.alphaque.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: freebsd-net@freebsd.org cc: Charlie Schluting cc: jeremie@foobar.com Subject: Re: packet order, ipf or ipfw X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jul 2004 11:30:00 -0000 On Thu, 29 Jul 2004, Jeremie Le Hen wrote: > Hello Charlie, > > > I'm running ipf because I like it ...but now I need to use ipfw's pipe > > feature. I was thinking that I could just run both, and keep all my > > rules in ipf, then in ipfw: limit bandwidth for a few vlans, then allow all. > > > > It didn't work (no rate-limiting happened).. and I'm thinking that ipf > > is passing the packets and bypassing ipfw? Or something.. > > > > So, what is the order, if I'm running ipf AND ipfw at the same time? > > Will it work at all in this manner? > > But you should be warned that using ipnat(8) in conjunction to ipfw > pipes may lead to an incorrect behaviour : > http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/61685 in addition, http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/46564 reverses the order in which ipfw/ipfilter/ipnat processes packets in ip_output.c to make it consistent if both are used. by default the flow is: wire -> ipnat -> ipfilter -> ipfw -> kernel -> ipfilter -> ipnat ->ipfw the patch in the above PR changes it to: wire -> ipnat -> ipfilter -> ipfw -> kernel -> ipfw -> ipfilter -> ipnat personally, i prefer the patch to ip_output as it makes it cleaner when you're separating between using ipfw/dummynet for shaping and ipfilter/ipnat for firewalling. Regards, /\_/\ "All dogs go to heaven." dinesh@alphaque.com (0 0) http://www.alphaque.com/ +==========================----oOO--(_)--OOo----==========================+ | for a in past present future; do | | for b in clients employers associates relatives neighbours pets; do | | echo "The opinions here in no way reflect the opinions of my $a $b." | | done; done | +=========================================================================+