[MLIST] Re: [olug] Firewall Newbie needs help

Mike Hostetler thehaas at binary.net
Wed Mar 5 16:42:05 UTC 2003


On Wed, Mar 05, 2003 at 10:39:50AM -0600, David Walker wrote:
> Just to address your problem of the changing IP
> I use the following line in my script to detect the current IP (assuming eth0 
> is your external card) and then I use ${MY_IP} wherever I need to reference 
> my IP address.
> 
> MY_IP=`/sbin/ifconfig eth0 | grep 'inet addr' | awk '{print $2}' | sed -e 
> 's/.*://'`

I was heading down that road but then I read about the MASQ target.
Maybe I'll just do that instead.

Thanks,
-- mikeh




More information about the OLUG mailing list