Linda,
I have written this comment in my ip-up.local:
# ip-up.local
# Parameters:
# $1 = INTERFACE
# $2 = DEVICE
# $3 = SPEED
# $4 = LOCAL_IP (As given by ISP)
# $5 = REMOTE_IP (of ISP)
The ip-up.local will already have the two IP addresses in $4 and $5.
Just use them. You may start by just echo'ing them to see what is their
contents.
Regards
Gustav
linda hanigan wrote:
>
> Hi All,
> Still trying to do a firewall. I have the following to try and capture the
> ipaddress from ifconfig
>
> EXTERNAL_INTERFACE="ppp0" #Internet connected interface
> IPADDR=`/sbin/ifconfig $EXTERNAL_INTERFACE | grep "inet addr:" | \awk -F:
> {'print '} | cut -d\ -f 1`
> echo "EXTERNAL_INTERFACE: ${EXTERNAL_INTERFACE} on ${IPADDR}"
>
> however the script output is
>
> EXTERNAL_INTERFACE: ppp0 on
>
> Now if I run
> /sbin/ifconfig ppp0 | grep "inet addr:" | \awk -F: {'print '} | cut -d\ -f
> 1
> from a prompt it gives the ipaddress - what am I doing wrong.
> Thanks
> Linda Hanigan
--
pgp = Pretty Good Privacy.
To get my public pgp key, send an e-mail to: [EMAIL PROTECTED]
Visit my web site at http://www.schaffter.com
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list