From owner-freebsd-pf@FreeBSD.ORG Thu Mar 30 19:55:31 2006 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4FBB816A511 for ; Thu, 30 Mar 2006 19:55:22 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id 7E80343D4C for ; Thu, 30 Mar 2006 19:55:21 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.177.54] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1FP3Ei3IRc-0002GW; Thu, 30 Mar 2006 21:55:17 +0200 From: Max Laier Organization: FreeBSD To: freebsd-pf@freebsd.org, brad-fbsd-pf@duttonbros.com Date: Thu, 30 Mar 2006 21:54:08 +0200 User-Agent: KMail/1.9.1 References: <3681.192.168.0.13.1143747208.squirrel@uno.mnl.com> In-Reply-To: <3681.192.168.0.13.1143747208.squirrel@uno.mnl.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart13950728.gSDoTWMlUn"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200603302154.15167.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Subject: Re: include files X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Mar 2006 19:55:31 -0000 --nextPart13950728.gSDoTWMlUn Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Thursday 30 March 2006 21:33, Bradley W. Dutton wrote: > Hi, > > I have 2 routers/firewalls setup with carp/pfsync that keep the network > going with the same pf.conf. Unfortunately the hardware in these boxes is > slightly different so the NICs have different names (em/sis/dc/etc). I > have macros defined at the top of pf.conf for the NICs but I still have to > change the macros each time I copy pf.conf from one box to the other. The > OpenBSD PF page (http://www.openbsd.org/faq/pf/shortcuts.html) alludes to > this scenario but I was wondering if there is a way to include more than > one conf file? It would be nice to have one file contain the macros and > the other contain all of the rules/queues/etc. > > What have others done in this scenario? Should I create a pf.conf template > file and a script that swaps in the NIC names and copies the files to each > of the boxes? You can use pfctl(8)'s -D switch to define the macros on the commandline or= =20 better in rc.conf(5)::pf_flags If you need plenty, that's not a perfect=20 sollution, I agree. In that case, I'd go for something like: cat /etc/pf.inc /etc/pf.conf | pfctl -f- =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --nextPart13950728.gSDoTWMlUn Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQBELDdnXyyEoT62BG0RAvz8AJsG8UaKpD5f/Eam/40ujuxA+Sd7gQCfTlC4 MbC24HfuQKDJvcnBH2/eGAI= =bGUB -----END PGP SIGNATURE----- --nextPart13950728.gSDoTWMlUn--