From owner-freebsd-security Fri Oct 13 22:57:37 2000 Delivered-To: freebsd-security@freebsd.org Received: from gndrsh.dnsmgr.net (GndRsh.dnsmgr.net [198.145.92.4]) by hub.freebsd.org (Postfix) with ESMTP id 5375A37B503 for ; Fri, 13 Oct 2000 22:57:31 -0700 (PDT) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.9.3/8.9.3) id WAA10422; Fri, 13 Oct 2000 22:57:00 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <200010140557.WAA10422@gndrsh.dnsmgr.net> Subject: Re: Dynamic rc.firewall In-Reply-To: <20001014010830.C37870@jade.chc-chimes.com> from Bill Fumerola at "Oct 14, 2000 01:08:30 am" To: billf@chimesnet.com (Bill Fumerola) Date: Fri, 13 Oct 2000 22:57:00 -0700 (PDT) Cc: cjclark@alum.mit.edu, mbloom@cinci.rr.com (Milo Bloom), roam@orbitel.bg (Peter Pentchev), redwards@meccamediagroup.com, freebsd-security@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL54 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-security@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org > 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