Bering-uClibc 4.x - User Guide - Advanced Topics - Setting Up a Dynamic DNS Client

From bering-uClibc
Jump to: navigation, search
Advanced Topics - Setting Up a Dynamic DNS Client
Bering-uClibc 4.x - User Guide Next


About ez-ipupdate

Ez-ipupdate is a small utility for updating your host name IP for any of the dynamic DNS services offered at:


The key features are:

  • Support for multiple service types
  • Updating your IP address if it changes.


To install the ezipupd.lrp package, edit leaf.cfg file and add ezipupd.lrp in the list of packages to be loaded at boot.

Configuring ez-ipupdate

You can edit the ez-ipupdate configuration file through the package configuration menu:

                       ez-ipupd configuration files

      1) ez-ipupdate configuration file

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


The parameters allowed in the configuration file are the following:

 address               usage: address=[ip address]
 cache-file            usage: cache-file=[cache file]
 cloak-title           usage: cloak-title=[title]
 daemon                usage: daemon=[command]
 execute               usage: execute=[shell command]
 debug                 usage: debug
 foreground            usage: foreground
 pid-file              usage: pid-file=[file]
 host                  usage: host=[host]
 interface             usage: interface=[interface]
 mx                    usage: mx=[mail exchanger]
 max-interval          usage: max-interval=[number of seconds between updates]
 notify-email          usage: notify-email=[address to email if bad things happen]
 offline               usage: offline
 retrys                usage: retrys=[number of trys]
 server                usage: server=[server name]
 service-type          usage: service-type=[service type]
 timeout               usage: timeout=[sec.millisec]
 resolv-period         usage: resolv-period=[time between failed resolve attempts]
 period                usage: period=[time between update attempts]
 url                   usage: url=[url]
 user                  usage: user=[user name][:password]
 run-as-user           usage: run-as-user=[user]
 run-as-euser          usage: run-as-euser=[user] (this is not secure)
 wildcard              usage: wildcard
 quiet                 usage: quiet
 connection-type       usage: connection-type=[connection type]
 request               usage: request=[request uri]
 partner               usage: partner=[easydns partner]

Here is how it could look like:

service-type=zoneedit
user=myname:mypassword
interface=eth0
host=mydomain.com
#notify-email=john.doe@mydomain.com
# other options:
#address=<ip address>
#cache-file=/tmp/ez-ipup
#daemon
#debug
#foreground
#host=<host>
#interface=<interface>
#mx=<mail exchanger>
#retrys=<number of trys>
#run-as-user=<user>
#run-as-euser=<user>
#server=<server name>
#timeout=<sec.millisec>
#max-interval=

The four most important entries for a typical LEAF Bering-uClibc installation will be explained below:

service-type 
make sure to add the according service-type. See above for the list of available services.
user 
here you have to provide your username and password for the choosen service seperated by a colon.
interface 
this defines your interface to the internet - the one which is changing from time to time and whose ip should be changed at your dynamic DNS service (usually eth0 or ppp0)
host 
the host(s) you like to have been updated. It is possible to update more than one host for a service-type. To allow that, add all your hosts separated by a comma.


Please note: The options cache-file and daemon aren't needed. notify-email doesn't work today.

Using ez-ipupdate

Through dhclient exit-hook script:

reload_all() {
  /sbin/shorewall restart
echo "Starting ez-ipupd from dhclient ..."
  /etc/init.d/ez-ipupd start
}

Through ppp's /etc/ppp/ip-up script: All you need is to add the command /etc/init.d/ez-ipupd -start to /etc/ppp/ip-up.

# Main Script starts here
#
/etc/init.d/ez-ipupd restart
run-parts /etc/ppp/ip-up.d
[ -x /bin/beep ] && /bin/beep -f 600 -n -f 900 -n -f1200 -n -f1800
# last line

Configure shorewall

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

HTTP(ACCEPT)         fw       net

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



Up Next