[ale] gateway external ip

David S. Jackson dsj at sylvester.dsj.net
Sun Aug 3 18:27:47 EDT 2003


On Sun, Aug 03, 2003 at 12:11:46AM -0400 Robert Coggins <ale at cogginsnet.com> 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.

Actually, another thing you could do is find the "username" your
ISP resolves your IP to.  It's usually kinda weird with big ISPs;
it probably won't be the same thing you log in with.  You can see
it when you log into an IRC channel and do a whois on yourself.

With me, it's user-NNNblahblah.biz.mindspring.com, even though I
have a static IP.  Once you know your username, you can do a
nslookup on yourself from your ISP's nameserver.  For me it would
be:

nslookup user-NNNblahblah.biz.mindspring.com ns1.earthlink.net

with the output being something like:  

nslookup user-NNNblahblah.biz.mindspring.com ns1.earthlink.net
Server:  ns1.earthlink.net
Address:  207.217.126.41

Non-authoritative answer:
Name:    user-NNNblahblah.biz.mindspring.com
Address:  NN.NNN.NN.NNN  <== Your IP here

Of course, one of those dynamic dns services sounds like a better
alternative...

-- 
David S. Jackson                        dsj at dsj.net
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
There comes a time in the affairs of a man when he has
to take the bull by the tail and face the situation.
		-- W.C. Fields
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale





More information about the Ale mailing list