Well, i think there's a better way to do this, that's casually what i'm ussing ;->. I've using some perl scripts to setup the firewall when connection to Internet is stabished or lost through a ISDN iface (this is irrelevant anyway); if you take a look to the pppd man page you'll find information enough about how ip-up and ip-down scripts are called, pppd sends a set of parameters to these scripts, between others the remote and local ip assigned in each ppp interface. Have a good one. Nick Zentena wrote:
On Wed, 19 Apr 2000, Reid, Rowan (GSP) wrote:
I'm am in the process of writing my own firewall script. the only problem is I need a way to extract the inet address assigned my my dialup isp. i'm not an avid script writer. is there an easy way to do this. I am pretty good in perl and can manipulate that to some usable variabe. whats the easiest way to do this ?
I asked basically the same thing awhile back. This is what the smart people helped me with.
EXTERNAL_INTERFACE="ppp0" export IPADDR=$(ifconfig ${EXTERNAL_INTERFACE}|sed -ne'/addr:/{s/.*addr:\([^ ]*\).*/\1/;p;}')
Change ppp0 to match whatever you need.
Nick -- Nick Zentena "The Linux issue," Wladawsky-Berger explained, "is whether this is a fundamentally disruptive technology, like the microprocessor and the Internet? We're betting that it is."
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/
-- Francisco M. Marzoa Alonso Nuevo Mundo - Dpto. Informático ICQ#: 62850923 Henri Dunant, 19 - 28036 Madrid tfno: +34 91 343 18 40 Ext. 207 España / Spain fax: +34 91 350 28 45 -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/Support/Doku/FAQ/