my lame attempt at a shell script...

Eric F Crist ecrist at
Mon Jan 3 15:29:18 PST 2005

A couple more questions, then I'm done. Promise.

I need to verify whether or not there is an entry for grog_firewall_oif 
and grog_firewall_iif in /etc/rc.conf.  If not, I want to exit with an 

Also, a little more advanced, I need to pull information from an 
ifconfig output.  I need to pull network numbers for both the internal 
interface, as well as external interface.  For example,

         inet netmask 0xffffff00 broadcast
         inet6 fe80::20e:a6ff:feb9:2d3d%vr0 prefixlen 64 scopeid 0x3
         ether 00:0e:a6:b9:2d:3d
         media: Ethernet autoselect (100baseTX <full-duplex>)
         status: active

I don't actually need my own address, I need to be able to figure out 
that the system, based on the above output, is on the 
network.  This will be input into my firewall rulesets.

I imagine that there's a util or command around that can do this, or I 
can code out the math, but there's got to be an easier way.

Thanks again.
Eric F Crist                  "I am so smart, S.M.R.T!"
Secure Computing Networks              -Homer J Simpson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 194 bytes
Desc: This is a digitally signed message part
Url :

More information about the freebsd-questions mailing list