From owner-freebsd-questions@FreeBSD.ORG Mon Jan 16 15:00:30 2006 Return-Path: X-Original-To: freebsd-questions@FreeBSD.org 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 BF19116A41F for ; Mon, 16 Jan 2006 15:00:30 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: from mail6.sea5.speakeasy.net (mail6.sea5.speakeasy.net [69.17.117.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69BC343D46 for ; Mon, 16 Jan 2006 15:00:30 +0000 (GMT) (envelope-from freebsd-questions-local@be-well.ilk.org) Received: (qmail 22337 invoked from network); 16 Jan 2006 14:48:50 -0000 Received: from dsl092-078-145.bos1.dsl.speakeasy.net (HELO be-well.ilk.org) ([66.92.78.145]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 16 Jan 2006 14:48:49 -0000 Received: by be-well.ilk.org (Postfix, from userid 1147) id 7B52F28423; Mon, 16 Jan 2006 09:48:49 -0500 (EST) Sender: lowell@be-well.ilk.org To: pfgshield-freebsd@yahoo.com References: <20060114182614.85884.qmail@web32911.mail.mud.yahoo.com> From: Lowell Gilbert Date: 16 Jan 2006 09:48:49 -0500 In-Reply-To: <20060114182614.85884.qmail@web32911.mail.mud.yahoo.com> Message-ID: <44slrofctq.fsf@be-well.ilk.org> Lines: 18 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: freebsd-questions@FreeBSD.org Subject: Re: /etc/rc.firewall and dhclient(8) X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@FreeBSD.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2006 15:00:30 -0000 writes: > I activated my firewall "client" configuration on my desktop that uses dhcp for > a cable modem. > > Everything works fine (I even enabled ping), however, everytime I shutdown and > restart the modem I find myself having to check /var/db/dhclient.leases.xl0 to > edit /etc/rc.firewall to change $net and $ip. > > Is there an easy way to automate this? That's what the "me" keyword is for in the ipfw syntax. Using this would require you to create a slightly customised version of the firewall rules file. Alternatively, you could have dhclient write the parameters out to a file that the firewall script would read in. dhclient-script(8) has "hooks" for this.