From owner-freebsd-current Wed Jan 15 15:07:56 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id PAA04627 for current-outgoing; Wed, 15 Jan 1997 15:07:56 -0800 (PST) Received: from horst.bfd.com (horst.bfd.com [204.160.242.10]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id PAA04618 for ; Wed, 15 Jan 1997 15:07:50 -0800 (PST) Received: from harlie (bastion.bfd.com [204.160.242.14]) by horst.bfd.com (8.7.6/8.7.3) with SMTP id PAA27340; Wed, 15 Jan 1997 15:07:35 -0800 (PST) Date: Wed, 15 Jan 1997 15:07:35 -0800 (PST) From: "Eric J. Schwertfeger" X-Sender: ejs@harlie To: Poul-Henning Kamp cc: Nate Williams , current@FreeBSD.ORG Subject: Re: ipfw cannot do this... In-Reply-To: <28373.853360497@critter.dk.tfs.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Wed, 15 Jan 1997, Poul-Henning Kamp wrote: > >> Actually, what I really want is an ipfw add skip XXX ... where if > >> something matches the rule, skip all other rules below XXX (yes, I always > >> number my rules:-) > > > >If you get a match, it *will* skip all the other rules. I don't want it to skip *ALL* the rules, only the ones I don't want applying to the current packet. Ah, I see where the misunderstanding is. I'm referring to something like this. /sbin/ipfw add 100 skip 300 from any to any via ed0 # the following rules do not apply to anything coming in via ed0, but do # apply to all other interfaces /sbin/ipfw add 200 deny log all from localnet1 to any /sbin/ipfw add 201 deny log all from localnet2 to any # at this point, these rules would apply to all interfaces /sbin/ipfw add 300 accept from all to mymachine admittedly not a good example of why I want something like this, but I'm trying to clear up the missunderstanding. > In essence what I needed was to skip only some rules, but reversing > the logic certainly did the trick for me. Here's one that can be pretty convoluted with the current rules. We use ipfw accounting to track the T1 usage of virtual servers and colocated equipment. The tracking is done on our primary web server, and all colocated equipment routes through this web server, though the rest of our equipment isn't behind this machine. However, we don't want to track "in-house" traffic. So, in order to do this using the current rules, we could do this one of two ways. 1) using the skip to rule XXX idea, tell it to skip the accounting rules if both source and destination are in our class C 2) handle all blocking (most of which is done by the router to the T1, so this is feasible), then accept all remaining from and to local addresses, then do the accounting, then accept the rest To me, method one looks cleaner. Then again, I'm really not saying that we desperately need this, just explaining why I'd be interested. Then again, the not would work nice for cleanwalling if you could say "not eth0" or such, ie /sbin/ipfw add 200 deny log all from localnet to any not eth0 where eth0 is the interface to localnet Hate to say it, but Linux's ipfwadm, with it's seperate input, forward, and output lists, makes cleanwalling and firewalling on the same machine quite simple, though not quite as simple as the "not eth0" form.