[ale] gateway external ip

matty91 at bellsouth.net matty91 at bellsouth.net
Sun Aug 3 18:56:29 EDT 2003


On Sun, 3 Aug 2003, Robert Coggins wrote:

> Hey all!
>
> I am using DSL w/ Bellsouth.  I would like to get my router's external
> ip address and email it to my cell phone.  I am going to try and write a
> script to do this.  However,  I am not sure how or what program I am
> going to use to get the ip.  Any ideas?  I thought about parsing my
> traceroute output.  However it didn't seem to work.

Since the IP blocks are well known, the following should work:

/sbin/ifconfig | grep inet | grep 65 | awk '{print $2}'

>
> Thanks all!
>
> Rob
>
>
> _______________________________________________
> Ale mailing list
> Ale at ale.org
> http://www.ale.org/mailman/listinfo/ale
>

Ryan Matteson - UNIX Administrator | GPG ID: 92D5DFFF
Public Key: http://www.daemons.net/~matty/public_key.txt
Fingerprint = 4BEC 6145 30A6 BCE6 5602 FF11 4954 165D 92D5 DFFF
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list