From owner-freebsd-questions Tue Nov 6 12:36: 0 2001 Delivered-To: freebsd-questions@freebsd.org Received: from mail.interchange.ubc.ca (mail.interchange.ubc.ca [137.82.27.15]) by hub.freebsd.org (Postfix) with ESMTP id 4290437B418 for ; Tue, 6 Nov 2001 12:35:55 -0800 (PST) Received: from dsl232.net.ubc.ca ([142.103.175.232] helo=ben) by mail.interchange.ubc.ca with smtp (Exim 3.03 #1) id 161Cwq-0003Xh-00; Tue, 06 Nov 2001 12:35:52 -0800 Message-Id: <3.0.32.20011106123552.00db8e40@pop.interchange.ubc.ca> X-Sender: zev@pop.interchange.ubc.ca X-Mailer: Windows Eudora Pro Version 3.0 (32) Date: Tue, 06 Nov 2001 12:35:53 -0800 To: Sean Ellis From: Zev Thompson Subject: Re: ipfw script values Cc: freebsd-questions@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi Sean, I use the following command in my rc.firewall: ifconfig ex0 | grep "inet " | awk '{print $2}' Where ex0 is my ethernet interface. The awk part just takes the 'inet' line and prints out the second term. Zev >Hello, > > I edited a general-purpose firewall rule script and use it on >a dual homed machine. It provides nat and filtering. My question >is, right now I have the value for the external interface ip number >'hard-wired' into the script. No problem, but the machine picks up >this number via dhcp, so I'd like to have something a little more >dynamic here. Does anyone have a suggestion for a nice neat way to >grab this and the network, and mask values. Are they available anywhere >in a convenient user-friendly form? > >thanks, > >-- >Sean > >To Unsubscribe: send mail to majordomo@FreeBSD.org >with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message