Date: Fri, 13 Oct 2000 22:57:00 -0700 (PDT) From: "Rodney W. Grimes" <freebsd@gndrsh.dnsmgr.net> To: billf@chimesnet.com (Bill Fumerola) Cc: cjclark@alum.mit.edu, mbloom@cinci.rr.com (Milo Bloom), roam@orbitel.bg (Peter Pentchev), redwards@meccamediagroup.com, freebsd-security@FreeBSD.ORG Subject: Re: Dynamic rc.firewall Message-ID: <200010140557.WAA10422@gndrsh.dnsmgr.net> In-Reply-To: <20001014010830.C37870@jade.chc-chimes.com> from Bill Fumerola at "Oct 14, 2000 01:08:30 am"
next in thread | previous in thread | raw e-mail | index | archive | help
> On Fri, Oct 13, 2000 at 09:34:31PM -0700, Crist J . Clark wrote: > > > > # set these to your outside interface network and netmask and ip > > > oif="ex0" # card name > > > onet="24.129.15.0" # whatever your assigned range will be > > > omask="255.255.255.0" > > > oip="`ifconfig ex0 | grep inet | awk '{ print $2 }'`" > > > > > > Hope this helps. Let me (or the list) know how that works for you. > > > > Wouldn't, > > > > oip="`ifconfig ex0 | awk /inet / '{ print $2 }'`" > > > > Make a little more sense than the gratuitous fgrep? > > Are /usr/bin/awk or /usr/bin/fgrep even available when rc.firewall > gets called? Depends on if /usr/bin is on a local (yes) or NFS (no) file system. > Note my stress on calling them by their full path.. :-) Note my stress on doing it the good old way, with the power of the Borne shell: ip=`ifconfig de1 | while read junk tip junk2 tnm junk3 tbc do if [ "${junk}" = "inet" ]; then echo ${tip} break fi done` -- Rod Grimes - KD7CAX @ CN85sl - (RWG25) rgrimes@gndrsh.dnsmgr.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?200010140557.WAA10422>