Difference between revisions of "Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Dynamic DNS Client with ddclient"

From bering-uClibc
Jump to: navigation, search
m (Configure shorewall)
(About ddclient)
 
(14 intermediate revisions by the same user not shown)
Line 3: Line 3:
  
 
|-
 
|-
| width="20%" align="left"  |  
+
| width="20%" align="left"  | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Dynamic DNS Client|Prev]]
 
! width="60%" align="center" | [[Bering-uClibc 5.x - User Guide]]
 
! width="60%" align="center" | [[Bering-uClibc 5.x - User Guide]]
 
| width="20%" align="right"  | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Wireless Access Point|Next]]
 
| width="20%" align="right"  | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Wireless Access Point|Next]]
Line 9: Line 9:
 
----
 
----
  
'''Note: This page is work-in-progress'''
 
  
 
==About ddclient==
 
==About ddclient==
Line 16: Line 15:
  
 
Supported dynamic DNS services are:
 
Supported dynamic DNS services are:
* DynDNS.com  http://www.dyndns.com
+
* DynDNS.com  [http://www.dyndns.com www.dyndns.com]
* Hammernode  http://www.hn.org
+
* Hammernode  [http://www.hn.org www.hn.org]
* Zoneedit    http://www.zoneedit.com
+
* Zoneedit    [http://www.zoneedit.com www.zoneedit.com]
* EasyDNS    http://www.easydns.com
+
* EasyDNS    [http://www.easydns.com www.easydns.com]
* NameCheap  http://www.namecheap.com
+
* NameCheap  [http://www.namecheap.com www.namecheap.com]
* ConCont    http://www.dydns.za.net
+
* ConCont    [http://www.dydns.za.net www.dydns.za.net]
* DnsPark    http://www.dnspark.com
+
* DnsPark    [http://www.dnspark.com www.dnspark.com]
* DslReports  http://www.dslreports.com
+
* DslReports  [http://www.dslreports.com www.dslreports.com]
* Sitelutions http://www.sitelutions.com
+
* Sitelutions [http://www.sitelutions.com www.sitesolutions.com]
* Loopia      http://www.loopia.se  
+
* Loopia      [http://www.loopia.se www.loopia.se]
* FreeDNS    http://FreeDNS.afraid.org
+
* FreeDNS    [http://FreeDNS.afraid.org FreeDNS.afraid.org]
(Probably more, but these are the ones we've found in the current <code class="filename">README</code> and <code class="filename">RELEASENOTES</code> of <code class="filename">ddclient)</code>.
+
* duckdns    [http://www.duckdns.org www.duckdns.org]
 +
 
 +
Have a look at [https://sourceforge.net/p/ddclient/wiki/protocols/ sourceforge.net/p/ddclient/wiki/protocols/] for a complete list of supported dynamic DNS services and advice how to configure <code class="filename">ddclient</code> for the supported services.
  
 
To load <code class="filename">ddclient</code> during boot, add <code class="filename">ddclient.lrp</code> to the list of packages in <code class="filename">leaf.cfg</code>.
 
To load <code class="filename">ddclient</code> during boot, add <code class="filename">ddclient.lrp</code> to the list of packages in <code class="filename">leaf.cfg</code>.
 +
 +
You can run <code class="filename">ddclient</code> 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, you can also update the IP address calling a script from <code class="filename">/etc/ppp/ip-up.d</code>, <code class="filename">dhclient-exit-hooks</code> etc.. Sample scripts to start with, are provided in the sources of <code class="filename">ddclient</code>.
 +
 +
The example given below makes the assumptions to use a cron-based approach, to change the IP address for the dynamic DNS serve <code class="filename">freedns.afraid.org</code>. 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==
 
==Configuring ddclient==
You can edit the ez-ipupdate configuration file through the package configuration menu:
+
You can edit the <code class="filename">ddclient</code> configuration files through the package configuration menu:
  
 
                         ddclient configuration files
 
                         ddclient configuration files
Line 43: Line 50:
 
         Selection:
 
         Selection:
  
 +
A minimal <code class="filename">ddclient</code> configuration in <code class="filename">/etc/ddclient/ddclient.conf</code> (for a PPP connection to the Internet in this case) 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 <code class="filename">ddclient</code> cron entry:
 +
 +
*/10 * * * *    root    /usr/sbin/ddclient -daemon=0 -syslog -quiet retry
  
tbc
+
The cron intervall has been set to run <code class="filename">ddclient</code> every ten minutes in no-daemon mode, log to syslog if the IP address of the interface <code class="filename">if</code>, named in <code class="filename">/etc/ddclient/ddclient.conf</code> has changed. And if so, it will update the IP address of your dynamic DNS service.
  
==Using ddclient==
 
tbd
 
 
==Configuring shorewall==
 
==Configuring shorewall==
 
You need to add a rule to allow accessing port 80 from your firewall on the net zone to make <tt>ddclient</tt> work.
 
You need to add a rule to allow accessing port 80 from your firewall on the net zone to make <tt>ddclient</tt> work.
Line 62: Line 79:
 
----
 
----
 
{| summary="Navigation footer" width="100%"
 
{| summary="Navigation footer" width="100%"
| width="40%" align="left"  |  
+
| width="40%" align="left"  | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Dynamic DNS Client|Prev]]
 
| width="20%" align="center" | [[Bering-uClibc 5.x - User Guide - Advanced Topics|Up]]
 
| width="20%" align="center" | [[Bering-uClibc 5.x - User Guide - Advanced Topics|Up]]
 
| width="40%" align="right"  | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Wireless Access Point|Next]]
 
| width="40%" align="right"  | [[Bering-uClibc 5.x - User Guide - Advanced Topics - Setting Up a Wireless Access Point|Next]]

Latest revision as of 16:06, 22 May 2016

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


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:

Have a look at sourceforge.net/p/ddclient/wiki/protocols/ for a complete list of supported dynamic DNS services and advice how to configure ddclient for the supported services.

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, 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 in /etc/ddclient/ddclient.conf (for a PPP connection to the Internet in this case) 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:

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

The cron intervall has been set to run ddclient every ten minutes in no-daemon mode, log to syslog if the IP address of the interface if, named in /etc/ddclient/ddclient.conf has changed. And if so, it will update the IP address of your dynamic DNS service.

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.


Prev Up Next