Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 13 Oct 2000 13:27:43 +0300
From:      Peter Pentchev <roam@orbitel.bg>
To:        Rolf Edwards <redwards@meccamediagroup.com>
Cc:        freebsd-security@FreeBSD.ORG
Subject:   Re: Dynamic rc.firewall
Message-ID:  <20001013132743.B17444@ringwraith.office1.bg>
In-Reply-To: <20001013131528.A17444@ringwraith.office1.bg>; from roam@orbitel.bg on Fri, Oct 13, 2000 at 01:15:28PM %2B0300
References:  <5.0.0.25.2.20001013032255.00a8ee40@127.0.0.1> <20001013131528.A17444@ringwraith.office1.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Oct 13, 2000 at 01:15:28PM +0300, Peter Pentchev wrote:
[snip]
> 
> Actually, this just made me think of a way better solution.  In a Bourne
> shell, you just do..
> 
> [roam@ringwraith /etc]$ set `ifconfig | fgrep -w inet`; outaddr=$2; outmask=$4; outbcast = $6
> 
> Yes, it really is that easy :)

..except it doesn't necessarily work :)  Don't you just love this feeling -
spotting an error in something you just mailed out to God knows how many
people :)

ifconfig | fgrep -w inet  returns the 'inet' line for ALL configured
interfaces; set `...` shall only use the first line, which in my case
just happened to be the xl0 iface..

set `ifconfig xl0 | fgrep -w inet`; outaddr="$2"; outmask="$4"; outbcast="$6"

..is a much better solution.

G'luck,
Peter

-- 
What would this sentence be like if pi were 3?


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?20001013132743.B17444>