Hi, I am having problems with some scripts, i use lines like this ( export IP_INET=`/sbin/ifconfig $IP_ETH0 | grep inet | cut -d: -f2 | cut -d\ -f1`; ) in my .bash_profile file to add environment variable to use with my firewall script then call them like iptables -A INPUT -s $IP_NET -j ACCEPT this works ok. The problem i am having is i have a dhcp assigned connection to another office, i am trying to add this line to my firewall script so it will check the ipaddress of my work connection and set the environvemt variable from there (ie: export IP_WORK=`host work.net.au | grep address | cut -f4 -d" "`; ), can anyone tell me how i can run this line from my firewall script and not my .bash_profile script, i can t seem to get it working, is it possible to have an env script that sets all the variables first??.. sorry if this is not totally iptables realted but some help would be apreciated so i can fine tune my firewall.
ps: yes im a newbie..... -- __________________________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup Save up to $160 by signing up for NetZero Platinum Internet service. http://www.netzero.net/?refcd=N2P0602NEP8
