Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Dynamic DNS Client with ddclient

From bering-uClibc
Revision as of 17:05, 1 January 2014 by Kapeka (Talk | contribs) (Configuring ddclient)

Jump to: navigation, search
Advanced Topics - Setting Up a Dynamic DNS Client with ddclient
Bering-uClibc 5.x - User Guide Next

Note: This page is work-in-progress

About ddclient

DDclient is a Perl client used to update dynamic DNS entries for accounts on Dynamic DNS Network Services' free DNS service. Supported features include: operating as a daemon, manual and automatic updates, static and dynamic updates, optimized updates for multiple addresses, MX, wildcards, abuse avoidance, retrying failed updates, and sending update status to syslog and through e-mail.

Supported dynamic DNS services are:

(Probably more, but these are the ones we've found in the current README and RELEASENOTES of ddclient).

To load ddclient during boot, add ddclient.lrp to the list of packages in leaf.cfg.

You can run ddclient either in daemon mode or from cron to update your IP address at a given dynamic DNS service. If you have a PPP connection/or DHCP connection, that changes frequently, to the Internet, you can also update the IP address calling a script from /etc/ppp/ip-up.d, dhclient-exit-hooks etc. sample scripts to start with, are provided in the sources of ddclient.

The example given below makes the assumptions to use a cron-based approach, to change the IP address for the dynamic DNS serve freedns.afraid.org. While this setup has been tested successfully and fit the authors need, it has the downside, that updates of the IP address after boot has a time lag of <math>(cron intervall*2)</math> after booting up the router and <math>(cron intervall-x)</math> if the address changes. If you need an immediate update, you'll have to investigate the daemon mode and/or scripts, that take care of updating your IP address, whenever it changes.

Everyone is invited to improve this documentaton with his/her findings - just contact us.

Configuring ddclient

You can edit the ddclient configuration files through the package configuration menu:

                       ddclient configuration files

      1) ddclient configuration
      2) ddclient cron entry

 q) quit
---------------------------------------------------------------------------
       Selection:

A minimal ddclient configuration (for a PPP connection in this case) to the Internet looks like this:

syslog=yes # log update msgs to syslog
use=if, if=ppp0
server=freedns.afraid.org
protocol=freedns
login=your-login-name
password=foobar
YourDomain #example.freedns.org

and the ddclient cron entry like this:

*/10 * * * *    root    /usr/sbin/ddclient -daemon=0 -syslog -quiet retry

The cron intervall has been set to check every 10 min and runs ddclient in no-daemon mode, logging to syslog, but be quiet otherwise.

Configuring shorewall

You need to add a rule to allow accessing port 80 from your firewall on the net zone to make ddclient work. Therefore add to /etc/shorewall/rules

HTTP/ACCEPT         fw       net

Don't forget to save your configuration with lrcfg -> s!

Additional Reading

https://sourceforge.net/p/ddclient/wiki/usage explains the available configuration options for ddclient.

https://sourceforge.net/p/ddclient/wiki/protocols documents how to use ddclient with otherdynamic DNS services.


Up Next