Date: Sat, 2 Mar 2002 22:40:33 -0500 From: "Scott M. Nolde" <scott@smnolde.com> To: George.Giles@mcmail.vanderbilt.edu Cc: freebsd-security@freebsd.org Subject: Re: ipfw and DHCP Message-ID: <20020302224033.D32060@smnolde.com> In-Reply-To: <OF25945D77.FFDCD63C-ON86256B6F.004C1698@MC.VANDERBILT.EDU>; from George.Giles@mcmail.vanderbilt.edu on Fri, Mar 01, 2002 at 07:52:26AM -0600 References: <OF25945D77.FFDCD63C-ON86256B6F.004C1698@MC.VANDERBILT.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
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"}'` omask=`grep subnet-mask /var/db/dhclient.leases | tail -1 | sed \ "s/[,;]//g" | awk '{print $3}'` oip=`grep fixed-address /var/db/dhclient.leases | tail -1 | sed \ "s/[,;]//g" | awk '{print $2}'` dns1=`grep domain-name-servers /var/db/dhclient.leases | tail -1 | sed \ "s/[,;]/ /g" | awk '{print $3}'` dns2=`grep domain-name-servers /var/db/dhclient.leases | tail -1 | sed \ "s/[,;]/ /g" | awk '{print $4}'` dhcp=`grep dhcp-server /var/db/dhclient.leases | tail -1 | sed "s/;//g" |\ awk '{print $3}'` -- Scott Nolde GPG Key 0xD869AB48 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?20020302224033.D32060>