From owner-freebsd-questions Wed Sep 4 6:14:39 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7080137B400 for ; Wed, 4 Sep 2002 06:14:37 -0700 (PDT) Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [24.147.188.198]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B56C43E4A for ; Wed, 4 Sep 2002 06:14:36 -0700 (PDT) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: from be-well.ilk.org (lowellg.ne.client2.attbi.com [24.147.188.198]) by be-well.ilk.org (8.12.5/8.12.5) with ESMTP id g84DEULu030149; Wed, 4 Sep 2002 09:14:30 -0400 (EDT) (envelope-from freebsd-questions-local@be-well.no-ip.com) Received: (from lowell@localhost) by be-well.ilk.org (8.12.5/8.12.5/Submit) id g84DEUZs030146; Wed, 4 Sep 2002 09:14:30 -0400 (EDT) X-Authentication-Warning: be-well.ilk.org: lowell set sender to freebsd-questions-local@be-well.ilk.org using -f To: dan@slightlystrange.org Cc: questions@FreeBSD.ORG Subject: Re: Macros in ipfw rules References: <20020903142632.GA71601@catflap.home.slightlystrange.org> From: Lowell Gilbert Date: 04 Sep 2002 09:14:30 -0400 In-Reply-To: <20020903142632.GA71601@catflap.home.slightlystrange.org> Message-ID: <443cspq4ll.fsf@be-well.ilk.org> Lines: 25 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Daniel Bye writes: > I have managed to get our departmental intranet site migrated from Win2K > to FreeBSD 4.6.2 (yay me - I did good ;-), and am now having trouble with > ipfw. I want to use a macro to prevent large groups of networks and > hosts from connecting, but I've drawn a blank with the syntax. You might want to consider doing it the other way around; create rules for what traffic you want to let in, and then drop everything else. > can use m4 or cpp, for example, but I cannot fathom the syntax necessary > to establish the macros. A simple scripting language is a much easier way to do this. > Anyone have any pointers to some docs online I can look at, or example > rules I can rip off? Or even a "reread the man pages, you twit, there's > examples aplenty" would be OK ;-) The canonical set of examples is /etc/rc.firewall. I suspect that in this case you will also find /usr/share/examples/ipfw to be useful, and there's a large section in the FreeBSD handbook that you should examine closely. Good luck. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message