Update IP addresses at dynamic DNS services Using ddclient

Sponsored Link
If you are using zoneedit.com or dyndns.org for your DNS service so that you can access your server using a URL, then you might have to update your DNS record at the service periodically whenever the IP address of your computer changes.Now here is simple solution for this ddclient.

Update IP addresses at dynamic DNS services.A perl based client to update your dynamic IP address at DynDNS.com (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. This client supports both the dynamic and (near) static services, MX setting, and alternative host. It caches the address, and only attempts the update if the address actually changes.

Install ddclient in ubuntu

sudo aptitude install ddclient

This will complete the installation

Configuring ddclient

If you want to reconfigure you seetings use the following command

dpkg-reconfigure ddclient

You want to make sure it runs as a service and monitors changes in ppp–something that the install wizard doesn’t cover.

Edit the configuration file /etc/ddclient.conf

sudo gedit /etc/ddclient.conf

# Configuration file for ddclient generated by debconf
# /etc/ddclient.conf

If you can’t find the public IP address, then you can have ddclient check your public IP address from the web by editing /etc/ddclient.conf and making it use the web by saying



use=web, web=checkip.dyndns.org/, web-skip=’IP Address’

Save and exit the file

Restart ddclient service using the following command

sudo /etc/init.d/ddclient restart

Sponsored Link

You may also like...

17 Responses

  1. Salimane MOUSTAPHA says:

    to Restart ddclient service, it should be the following command

    sudo /etc/init.d/ddclient force-reload
    sudo /etc/init.d/ddclient restart

  2. admin says:


    thanks for your comment i have updated the article

  3. Robert Levy says:

    Isn’t this just what people have been doing? Here is the short Perl I wrote to update my ZoneEdit.


    $ipthere = `cat $homedir/.ip`;
    chomp $ipthere;
    while ($ipnow eq "") {
    $ipnow=`wget -q -O - www.whatismyip.com/automation/n09230945.asp`;
    sleep(3) if $ipnow eq ""; }
    if (!($ipthere eq $ipnow )) {
    print "changing $ipthere to $ipnow\n";
    print `curl -s --basic --user "$user:$pass" --data-ascii "host=$host" "http://dynamic.zoneedit.com/auth/dynamic.html"`;
    system("echo $ipnow > $homedir/.ip"); }

  4. Robert Levy says:

    Also, because I have this as a cron job, I receive an email of the output when it updates the IP.

  5. KevDog says:

    Can this be used with noip.com?

  6. robbo says:

    DynDNS requires that the IP needs to be updated at least once a month but that it shouldn’t be done too often. Where in the ddclient.conf is a time period located ?

  7. admin says:

    use the following option


    The above line tells ddclient to update your public IP address every 5 minutes (specified in secconds).

  8. robbo says:

    thanks, I was just concerned though since DynDNS said it would drop the account if it was done too often.

  9. chris says:

    my routers got a ddns client on it most do.

    how would you use this behind a nat address pool ?

  10. zainuddin says:

    sudo aptitude install ddclient

    Couldn’t find any package whose name or description matched “ddclient”

  11. admin says:


    make sure you have enabled universe and multiverse repositories

  12. gayan says:

    hiiiiii all

    plsssssssss can u help me.. let me know this script how to configure in with zoneedit plsssss post or mail me.. i m not familyer with script so plssss help me step by step or pls tell website..


  13. Per says:


    the daemon=300 only tells ddclient daemon to check once every 5 minutes, if the ip address has been updated, and if so, it sends an update the the ddns server

    if no ip address changes have occured, it does NOT send an update to the ddns server

    however, the ddclient running in daemon mode should automatically send an update every month, (i think every 25 days or something like that), even if no changes have been made in the ip address, in order to keep the account active

    if you run the ddclient from a cron job, you can simply make another cron job with a FORCED update once every 30 days or so, see the manual for info about how to make a forced update

    if your ip address changes more often than once a month, there is no problem, since it will be updated no longer than 5 minutes after the ip address changes

    but if your ip address is in constant use for months, u will have to make the separate cron job, or preferably, run ddclient in daemon mode

    in the end it all depends on which ip renewal rules your internet provider has set up for their DHCP server

  14. Roy says:

    This is my /etc/ddclient.conf

    ## use=if, if=eth0
    use=web, web=checkip.dyndns.org/

    It is a little bit different from the setting here, can anyone see a problem in my settings?

    Also, what is web-skip=’IP Address’


  15. mrmikey05 says:

    I set everything up correctly and the status is running. But it show this error when restart:

    * Restarting Dynamic DNS service update utility ddclient WARNING: skipping host: Address´: ‘login=’ is an invalid login.

    Can anyone help me out. I have a account with DYNDNS.com. The username I used is correct but error says its invalid. Password is also correct.

  16. manic says:

    mrmikey, do you have quotes around your username and password? I believe you need them around your host name as well… Ex:


    I’ll probably have it figured out by the time anybody answers this, but what is

    web-skip=’IP Address’


  17. SLM says:

    @ invalid login error:

    If you cut and paste this line from above:
    use=web, web=checkip.dyndns.org/, web-skip=’IP Address’

    you will end up with ’ characters, not ‘ characters, which causes this error.

Leave a Reply

Your email address will not be published. Required fields are marked *