From owner-freebsd-questions Mon Jan 6 10: 4: 4 2003 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 712DF37B401 for ; Mon, 6 Jan 2003 10:04:03 -0800 (PST) Received: from cactus.fi.uba.ar (cactus.fi.uba.ar [157.92.49.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3C52F43EB2 for ; Mon, 6 Jan 2003 10:04:02 -0800 (PST) (envelope-from fgleiser@cactus.fi.uba.ar) Received: from cactus.fi.uba.ar (cactus.fi.uba.ar [157.92.49.108]) by cactus.fi.uba.ar (8.12.3/8.12.3) with ESMTP id h06I4lCd053064; Mon, 6 Jan 2003 15:04:47 -0300 (ART) (envelope-from fgleiser@cactus.fi.uba.ar) Date: Mon, 6 Jan 2003 15:04:47 -0300 (ART) From: Fernando Gleiser To: Jonathan Belson Cc: freebsd-questions@FreeBSD.ORG Subject: Re: [Q] ipfw and 'me' In-Reply-To: <3E19C280.8030201@witchspace.com> Message-ID: <20030106150333.B53038-100000@cactus.fi.uba.ar> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Status: No, hits=-103.4 required=5.0 tests=IN_REP_TO,USER_IN_WHITELIST version=2.31 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 On Mon, 6 Jan 2003, Jonathan Belson wrote: > Jack L. Stone wrote: > > The best way to do this is to use "awk" to determine and set a variable for > > the external IP every time it changes and then refer to that variable in > > your rules. > > ifconfig | grep ^xl0 -1 | tail -n 1 | awk '{ print $2 }' > > Any neater way? :-) yes :) ifconfig xl0 | awk '/^\tinet / {print $2}' Fer > > > --Jon > > http://www.witchspace.com > > > 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