Does the White Russian 0.9 DynDNS client suck just as much?

Stephen Ryan stephen at sryanfamily.info
Fri Jun 15 10:58:30 EDT 2007


(sorry, meant to send this to the list)

On Fri, 2007-06-15 at 10:35 -0400, VirginSnow at vfemail.net wrote:
> > Date: Fri, 15 Jun 2007 08:42:28 -0400
> > From: "Tom Buskey" <tom at buskey.name>
> 
> > I've been using zonedit and a cronjob script to check if my router's IP
> > changed.
> > It's got some old cruft in it.
> 
> Please, please, please, folks!  Don't even THINK about doing stuff
> like this.  (Newbies, cover your eyes!)
> 
> > # What's my IP?
> > lynx -dump  -accept_all_cookies http://www.whatismyip.com | egrep '[0-9]' |
> 
> Most DHCP clients will store the current IP in some kind of
> lease/cache file.  DHCP lease files are usually pretty easy to parse.
> But, if you really must get your IP address the hard way, you could
> use something with fewer teeth than scraping www.whatismyip.com:
> 
> # ifconfig "`route | grep default | awk '{print $8}'`" | \
>     grep inet | awk '{print $2}' | cut -d : -f 2

Actually, that gives the IP address of this machine, not the IP address
of the router, which, given that it's IP address might change, is quite
likely doing address translation before hitting the public internet.  In
the case of my home network, running through some cheap consumer-grade
Netgear job, the only way to find out the public IP address is to scrape
some web page, and whatismyip.com is probably the easiest one to get at.
It's certainly easier than getting the password-protected front page the
router serves up!




More information about the gnhlug-discuss mailing list