Get Dynamic IP from Linksys router for nsupdate

Brian Johnson bjohnson at
Mon Dec 9 15:08:28 UTC 2002

Here's what gets the internet IP address of my router that I'm going to try to use
with nsupdate to dynamically update my remote dns server

wget -q -O - | grep 'IP Address' | awk '{ print $4 }'

Also, I was already using ddclient to update a account so this also
works for me

ddclient -query | grep linksys | awk '{ print $4 }'

If anyone has any other tips/concerns about my intended process (map a name to my
remote office via nsupdate) please let me know - basically I'm trying to set up my
own private dyndns type service for our domain

David Magda (dmagda+usenet at wrote*:
>"Brian Johnson" <bjohnson at> writes:
>> How do I get the Linksys router IP address?
>I use DynDNS and the utility ipcheck [1]. It's written in
>Python. There are also Perl scripts. Check the DynDNS [2] web page.
>How's your shell scripting? You could get one of these scripts, parse
>the output for the IP, save it, and have the script send the IP
>address wherever you want.
>You should be able to tell these scipts not to update the DynDNS
>account (ipcheck has the "-t" option for this).

More information about the bind-users mailing list