[ale] gateway external ip
David S. Jackson
dsj at sylvester.dsj.net
Mon Aug 4 09:20:51 EDT 2003
On Sun, Aug 03, 2003 at 06:56:29PM -0400 matty91 at bellsouth.net <matty91 at bellsouth.net> wrote:
> 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}'
What if his router is a linksys or something? From a client PC,
wouldn't this just give his internal gateway IP? (or nothing,
unless he's using a 65 in his internal network...)
--
David S. Jackson dsj at dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Is it weird in here, or is it just me?
-- Steven Wright
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list