Table of Contents
A perl based client to update your dynamic IP address at DynDNS.org (or other dynamic DNS services such as Hammernode, Zoneedit or EasyDNS), thus allowing you and others to use a fixed hostname (myhost.dyndns.org) to access your machine.
Dynamic DNS services currently supported include:
DynDNS.org - See http://www.dyndns.org for details on obtaining a free account.
Hammernode - See http://www.hn.org for details on obtaining a free account.
Zoneedit - See http://www.zoneedit.com for details.
EasyDNS - See http://www.easydns.com for details.
NameCheap - See http://www.namecheap.com for details
you can update your DynDNS entry automatically every time your lease is obtained or renewed by creating an executable file named:
/etc/dhclient-exit-hooks
ie.:
cp sample-etc_dhclient-exit-hooks /etc/dhclient-exit-hooks
Edit /etc/dhclient-exit-hooks to change any options required.
#!/bin/sh ###################################################################### ## $Header: /cvsroot/ddclient/ddclient/sample-etc_dhclient-exit-hooks,v 1.1.1.1 2004/08/13 22:29:17 wimpunk Exp $ ###################################################################### # The /etc/dhclient-enter-hooks script is run by the ISC DHCP client's standard # update script whenever dhclient obtains or renews an address. PATH=/usr/sbin:${PATH} case "$new_ip_address" in 10.*) ;; 172.1[6-9].* | 172.2[0-9].* | 172.3[0-1].*) ;; 192.168.*) ;; *) logger -t dhclient IP address changed to $new_ip_address ddclient -daemon=0 -syslog -use=ip -ip=$new_ip_address >/dev/null 2>&1 ;; esac
Note: If your adsl modem is acting like a DHCP server, then this would not work. I have the following line in /etc/dhclient-exit-hooks, which proofs that when I get a new external IP, the /etc/dhclient-exit-hooks is not called.
logger -t dhclient IP address changed
enable debugging and verbose messages.
$ ddclient -daemon=0 -debug -verbose -noquiet
Define the IP address of your router with fw=xxx.xxx.xxx.xxx in /etc/ddclient/ddclient.conf and then try
$ ddclient -daemon=0 -query
to see if the router status web page can be understood.
Need support for another router/firewall?
Define the router status page yourself with:
fw=url-to-your-router's-status-page fw-skip=any-string-preceding-your-IP-address
ddclient does something like this to provide builtin support for common routers. For example, the Linksys routers could have been added with:
fw=192.168.1.1/Status.htm fw-skip=WAN.*?IP Address
OR Send me the output from:
$ ddclient -geturl {fw-ip-status-url} [-login login [-password password]]
and I'll add it to the next release!
ie. for my fw/router I used:
$ ddclient -geturl 192.168.1.254/status.htm
Some broadband routers require the use of a password when ddclient accesses its status page to determine the router's WAN IP address. If this is the case for your router, add
fw-login=your-router-login fw-password=your-router-password
to the beginning of your ddclient.conf file. Note that some routers use either 'root' or 'admin' as their login while some others accept anything.