From owner-freebsd-questions Tue Sep 3 7:26:46 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 D215A37B400 for ; Tue, 3 Sep 2002 07:26:42 -0700 (PDT) Received: from catflap.home.slightlystrange.org (host217-39-91-62.in-addr.btopenworld.com [217.39.91.62]) by mx1.FreeBSD.org (Postfix) with ESMTP id C48A943E4A for ; Tue, 3 Sep 2002 07:26:41 -0700 (PDT) (envelope-from dan@slightlystrange.org) Received: from danielby by catflap.home.slightlystrange.org with local (Exim 3.36 #1) id 17mEdV-000L0h-00 for questions@freebsd.org; Tue, 03 Sep 2002 15:26:33 +0100 Date: Tue, 3 Sep 2002 15:26:32 +0100 From: Daniel Bye To: questions@freebsd.org Subject: Macros in ipfw rules Message-ID: <20020903142632.GA71601@catflap.home.slightlystrange.org> Reply-To: dan@slightlystrange.org Mail-Followup-To: questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i X-Scanner: exiscan *17mEdV-000L0h-00*enpWNOLh6yQ* (SlightlyStrange.org, Using NOD32 http://www.nod32.com) 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 Hi all, I have been reading round (man pages for ipfw, m4, etc, and Google), but can't seem to find what I'm looking for... 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. I know I can use m4 or cpp, for example, but I cannot fathom the syntax necessary to establish the macros. From the ipfw man page, I see this is possible: ipfw add deny ip from netgroup1 to ${myip} Defining netgroup1 is where I get stuck! I know I need to predeclare the macro, but never having used m4 or cpp I dunno what I'm doing, and unless I've become totally blind, I can't see examples in the man pages. 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 ;-) TIA, Dan -- Daniel Bye PGP Key: ftp://ftp.slightlystrange.org/pgpkey/dan.asc PGP Key fingerprint: 3D73 AF47 D448 C5CA 88B4 0DCF 849C 1C33 3C48 2CDC _ ASCII ribbon campaign ( ) - against HTML, vCards and X - proprietary attachments in e-mail / \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message