Currently I have an ISP that provides an IP address via DHCP, and the address occasionally changes. What I want to do is to retrieve the IP address of the Internet side interface (eth0) of my firewall without manual intervention, and stuff that value into a variable. I need the value for additional DNAT rules because I have a web server and email server on my LAN.
This sounds like it should have a really simple solution (like some Bash command or something), and I've looked all over to find how to do this, but haven't seen it anywhere, so forgive me for my ignorance if I've overlooked something outrageously simple. I know I can use the command 'ip addr' to get the IP address information but it comes with a bunch of extra stuff I don't want and need. I just want the IP address of eth0. Since I have not found a simple way to do it, my plan was to create a Bash script to strip away all the extra junk from the 'ip addr' command, and then stuff the IP address value into the variable (within the /etc/shorwall/params file). Before I write that script, I just wanted to check if there was a better way to retrieve the IP address (and only the IP address) of the eth0 interface of the firewall. The firewall is currently running LEAF 2.0.1, but based upon previous assistance (thank you very much for the help), I'll be upgrading to the latest version. The packages loaded are: root,config,etc,local,modules,hdsupp,libm,mawk,tc,daemontl,iptables, shorwall,ulogd,dhcpcd,dnscache,dropbear,weblet,ntpdate,ipsec,ncurses,bash I thank you ahead of time for the assistance, and I beg your forgiveness if I overlooked some information that would have provided me the answer (I truly looked all over the place and just couldn't find the answer). bpk ------------------------------------------------------- This SF.Net email is sponsored by: Oracle 10g Get certified on the hottest thing ever to hit the market... Oracle 10g. Take an Oracle 10g class now, and we'll give you the exam FREE. http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click ------------------------------------------------------------------------ leaf-user mailing list: [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/leaf-user SR FAQ: http://leaf-project.org/pub/doc/docmanager/docid_1891.html
