Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 2 Mar 2002 20:37:10 -0800
From:      Jaron Omega <jaron@af-inet.net>
To:        "Scott M. Nolde" <scott@smnolde.com>
Cc:        freebsd-security@freebsd.org
Subject:   Re: ipfw and DHCP
Message-ID:  <20020303043710.GC26985@af-inet.net>
In-Reply-To: <20020302224033.D32060@smnolde.com>
References:  <OF25945D77.FFDCD63C-ON86256B6F.004C1698@MC.VANDERBILT.EDU> <20020302224033.D32060@smnolde.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020303043710.GC26985>