Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 06 Nov 2001 12:35:53 -0800
From:      Zev Thompson <zev@interchange.ubc.ca>
To:        Sean Ellis <sellis@intergate.ca>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ipfw script values
Message-ID:  <3.0.32.20011106123552.00db8e40@pop.interchange.ubc.ca>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3.0.32.20011106123552.00db8e40>