From owner-freebsd-questions@FreeBSD.ORG Mon Jan 3 23:29:18 2005 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBB3116A4CE for ; Mon, 3 Jan 2005 23:29:18 +0000 (GMT) Received: from grog.secure-computing.net (grog.secure-computing.net [63.228.14.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B1AD43D53 for ; Mon, 3 Jan 2005 23:29:18 +0000 (GMT) (envelope-from ecrist@secure-computing.net) Received: from [192.168.1.102] (c-66-41-157-209.mn.client2.attbi.com [66.41.157.209]) (authenticated bits=0)j03NT0Vv031493; Mon, 3 Jan 2005 17:29:12 -0600 (CST) (envelope-from ecrist@secure-computing.net) In-Reply-To: <7C6BEBEDE2DB4AC7E55D6843@utd49554.utdallas.edu> References: <06DDB71C-5DB4-11D9-B56F-000D9333E43C@secure-computing.net> <15416223037.20050103193803@hexren.net> <6074EB8D-5DC6-11D9-89A5-000D93AD26C8@tntluoma.com> <41D9BA53.4060105@locolomo.org> <2DF07A46-5DD2-11D9-89A5-000D93AD26C8@tntluoma.com> <3E8DD18E8557227C2A3C8E5A@utd49554.utdallas.edu> <7C6BEBEDE2DB4AC7E55D6843@utd49554.utdallas.edu> Mime-Version: 1.0 (Apple Message framework v619) Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Apple-Mail-15--213798321" Message-Id: <3D1AE682-5DDF-11D9-B56F-000D9333E43C@secure-computing.net> Content-Transfer-Encoding: 7bit From: Eric F Crist Date: Mon, 3 Jan 2005 17:28:56 -0600 To: Paul Schmehl X-Pgp-Agent: GPGMail 1.0.2 X-Mailer: Apple Mail (2.619) X-Spam-Status: No, hits=0.0 required=5.0 tests=none autolearn=no version=2.64 X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on grog.secure-computing.net cc: Timothy Luoma cc: FreeBSD-Questions Questions Subject: Re: my lame attempt at a shell script... X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jan 2005 23:29:18 -0000 --Apple-Mail-15--213798321 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII; format=flowed 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 error. 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, vr0: flags=8843 mtu 1500 inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255 inet6 fe80::20e:a6ff:feb9:2d3d%vr0 prefixlen 64 scopeid 0x3 ether 00:0e:a6:b9:2d:3d media: Ethernet autoselect (100baseTX ) 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 192.168.1.0/24 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 --Apple-Mail-15--213798321 content-type: application/pgp-signature; x-mac-type=70674453; name=PGP.sig content-description: This is a digitally signed message part content-disposition: inline; filename=PGP.sig content-transfer-encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (Darwin) iEYEARECAAYFAkHZ1TgACgkQRAAY9knOW+oJ6ACfccvu1Bi5juXQ2+T9a1VJJjUZ eTUAn2aXCoQ4h/+NQhiPOtEXv5c+qI5i =0Me/ -----END PGP SIGNATURE----- --Apple-Mail-15--213798321--