> How do this if IP address changes uncontrollably > like with DHCP?? The following sh script will extract the ip address of the external interface. If the address changes forcable ie not just when you renew your lease volentarily then run the script on cron $IFCONFIG = /path/ifconfig $EXTIF = ppp0 or whatever $AWK=/patch/awk EXTIP="`$IFCONFIG $EXTIF | $AWK \ /$EXTIF/'{next}//{split($0,a,":");split(a[2],a," ");print a[1];exit}'`"