From owner-freebsd-stable Tue Oct 10 19:15:39 2000 Delivered-To: freebsd-stable@freebsd.org Received: from mail.gmx.net (pop.gmx.net [194.221.183.20]) by hub.freebsd.org (Postfix) with SMTP id 7827437B503 for ; Tue, 10 Oct 2000 19:15:35 -0700 (PDT) Received: (qmail 21261 invoked by uid 0); 11 Oct 2000 02:15:33 -0000 Received: from p3ee2160b.dip.t-dialin.net (HELO speedy.gsinet) (62.226.22.11) by mail.gmx.net with SMTP; 11 Oct 2000 02:15:33 -0000 Received: (from sittig@localhost) by speedy.gsinet (8.8.8/8.8.8) id CAA20953 for freebsd-stable@FreeBSD.ORG; Wed, 11 Oct 2000 02:05:59 +0200 Date: Wed, 11 Oct 2000 02:05:59 +0200 From: Gerhard Sittig To: freebsd-stable@FreeBSD.ORG Subject: Re: ipf vs. ipfw ? Message-ID: <20001011020559.Y31338@speedy.gsinet> Mail-Followup-To: freebsd-stable@FreeBSD.ORG References: <20001008224359.R31338@speedy.gsinet> <20001009193445.T31338@speedy.gsinet> <14819.8982.61823.868907@onceler.kciLink.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <14819.8982.61823.868907@onceler.kciLink.com>; from khera@kciLink.com on Tue, Oct 10, 2000 at 10:09:26AM -0400 Organization: System Defenestrators Inc. Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, Oct 10, 2000 at 10:09 -0400, Vivek Khera wrote: > >>>>> "GS" == Gerhard Sittig writes: > > GS> same mechanism -- just with ipfw behind the pipe! And these > GS> substitutions maybe could get nested if needed like this: > > GS> REPEAT S1 $SRC : REPEAT S2 $DEST : pass ... from S1 to S2 ... > > GS> if implemented in some intelligent way. Has someone gotten > GS> behind the stage of thinking about this and actually started > GS> planning or implementing it? I would be interested in different > GS> thoughts. > > ipfw lets you pre-process a file using any arbitrary pre-processor. > It recommends cpp or m4, but who's to stop you from using perl? Just > make your FW rule file be a perl program and run it thusly: > > ipfw -p /usr/bin/perl firewall.perl > > and you're set. That's exactly what I have now (150 lines of Perl code doing loops and grouping and substitutions, etc). But I have to admin that I don't use ipfw -- I don't want to learn another syntax, and I don't miss the dummy bandwidth limiter. That's why I stick with ipf (plus because I have machines around not running FreeBSD). > Just make sure that the output of your firewall.perl program is > a valid set of firewall rules. I guess the only trick would be > figuring out how to pass flags to your program. Not at all with the hooks I applied to /etc/rc.network. :) And one could even drive it to insanity with stacking shell code (here document) and cpp and perl and whatever upon each other. :> In case there's popular demand, I could post the 4KB script. It's not tied to any filter language and not even to substituting filter rules. Although it's just a hack. Anyone could do better on their own, I guess. virtually yours 82D1 9B9C 01DC 4FB4 D7B4 61BE 3F49 4F77 72DE DA76 Gerhard Sittig true | mail -s "get gpg key" Gerhard.Sittig@gmx.net -- If you don't understand or are scared by any of the above ask your parents or an adult to help you. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message