From owner-freebsd-security Sat Mar 2 20:37:33 2002 Delivered-To: freebsd-security@freebsd.org Received: from mail.af-inet.net (ip68-6-186-205.sd.sd.cox.net [68.6.186.205]) by hub.freebsd.org (Postfix) with ESMTP id A527C37B431 for ; Sat, 2 Mar 2002 20:37:21 -0800 (PST) Received: (from jaron@localhost) by mail.af-inet.net (8.11.6/8.11.6) id g234bB384704; Sat, 2 Mar 2002 20:37:11 -0800 (PST) (envelope-from jaron@af-inet.net) Date: Sat, 2 Mar 2002 20:37:10 -0800 From: Jaron Omega To: "Scott M. Nolde" Cc: freebsd-security@freebsd.org Subject: Re: ipfw and DHCP Message-ID: <20020303043710.GC26985@af-inet.net> References: <20020302224033.D32060@smnolde.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020302224033.D32060@smnolde.com> User-Agent: Mutt/1.3.25i Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On Sat, Mar 02, 2002 at 10:40:33PM -0500, Scott M. Nolde wrote: > George.Giles@mcmail.vanderbilt.edu(George.Giles@mcmail.vanderbilt.edu)@2002.03.01 07:52:26 +0000: > > How do you get ipfw to pick-up DHCP value for oif in the rc.firewall script > > ? > > > This is what I do: > onet=`/sbin/ifconfig dc0 | grep -w inet | awk '{print $2}' | awk -F. \ > '{print $1 "." $2 "." $3 ".0"}'` or so you don't call the same command twice.. onet=`/sbin/ifconfig dc0 | grep inet\ | awk '{split($2, x, /\./); printf("%s.%s.%s.0", x[1], x[2], x[3])}'` Jaron Omega jaron@{af-inet.net,sock-stream.net} To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-security" in the body of the message