This is a template of the ddclient.conf and ddclient file that I use to update my ddns(I use no-ip).
I don't use the template provided by ddclient -help:
Code:
The 'No-IP Compatible' protocol is used to make dynamic dns updates
over an http request. Details of the protocol are outlined at:
http://www.no-ip.com/integrate/
Configuration variables applicable to the 'noip' protocol are:
protocol=noip ##
server=fqdn.of.service ## defaults to dynupdate.no-ip.com
login=service-login ## login name and password registered with the service
password=service-password ##
fully.qualified.host ## the host registered with the service.
Example ddclient.conf file entries:
## single host update
protocol=noip, \
login=userlogin@domain.com, \
password=noip-password \
myhost.no-ip.biz
I instead used
this page since combined with others (for getting the PID and Cache of ddns in a separate file). These are the config files:
Code:
# Configuration file for ddclient generated by debconf
#
# /etc/ddclient.conf
daemon=300 # check every 300 seconds
pid=/var/run/ddclient.pid # record PID in file
syslog=yes # record a log
ssl=yes # requires perl ssl module
cache=/var/cache/ddclient/ddclient.cache # cache file
#
protocol=noip # no-ip
use=web, web=checkip.dyndns.com/, web-skip='IP Address'
server=dynupdate.no-ip.com
login='$myuser'
password='$mypass'
$hostname.ddns.net, www.#hostname.ddns.net
And the other file is this
# Configuration for ddclient scripts
# generated from debconf on Sat Dec 22 09:32:58 GMT 2012
# /etc/default/ddclient
...
# Set the time interval between the updates of the dynamic DNS name in seconds.
# This option only takes effect if the ddclient runs in daemon mode.
daemon_interval="3600"
# Set to "true" if ddclient should run in daemon mode
# If this is changed to true, run_ipup and run_dhclient must be set to false.
run_daemon="true"
...
I added the daemon=3600 line in the ddclient.conf file, because it seems like /etc/default/ddclient uses that interval. I also set run_daemon="true" because I want this script to run every 3600 seconds (each hour). I don't know why I should do this, since it seems redundant to write the daemoon check interval in two config files.
I used journalctl -u ddclient.service and the output is:
Code:
-- Logs begin at Fri 2019-12-20 23:35:31 GMT, end at Sat 2019-12-21 21:59:01 GMT. --
Dec 21 21:24:52 raspberrypi systemd[1]: Starting LSB: Update dynamic domain name service entries...
Dec 21 21:24:52 raspberrypi ddclient[30612]: WARNING: file /etc/ddclient.conf, line 7: Invalid Value for keyword 'server' = ''
Dec 21 21:24:52 raspberrypi ddclient[30620]: WARNING: file /etc/ddclient.conf, line 7: Invalid Value for keyword 'server' = ''
Dec 21 21:24:52 raspberrypi ddclient[30612]: WARNING: file /etc/ddclient.conf, line 8: Invalid Value for keyword 'login' = ''
Dec 21 21:24:52 raspberrypi ddclient[30622]: WARNING: file /etc/ddclient.conf, line 8: Invalid Value for keyword 'login' = ''
Dec 21 21:24:52 raspberrypi ddclient[30612]: WARNING: skipping host: justgetmyip.ddns.net: 'login=' is an invalid login.
Dec 21 21:24:52 raspberrypi ddclient[30624]: WARNING: skipping host: justgetmyip.ddns.net: 'login=' is an invalid login.
Dec 21 21:24:52 raspberrypi systemd[1]: Started LSB: Update dynamic domain name service entries.
Dec 21 21:24:52 raspberrypi ddclient[30627]: WARNING: file /etc/ddclient.conf, line 7: Invalid Value for keyword 'server' = ''
Dec 21 21:24:52 raspberrypi ddclient[30629]: WARNING: file /etc/ddclient.conf, line 8: Invalid Value for keyword 'login' = ''
Dec 21 21:24:52 raspberrypi ddclient[30631]: WARNING: skipping host: justgetmyip.ddns.net: 'login=' is an invalid login.
Dec 21 21:28:16 raspberrypi systemd[1]: Stopping LSB: Update dynamic domain name service entries...
Dec 21 21:28:16 raspberrypi systemd[1]: ddclient.service: Succeeded.
The ddclient doesn't work. Checking the logs doesn't help since it shows a Success message always, even when it doesn't update the IP in the registrar:
Using
Code:
sudo ddclient -daemon=0 -noquiet -debug -verbose
to execute ddclient update without waiting for the daemoon interval, also shows success, but the IP is not updated.
These are my questions, if you are kind enough to answer them:
- Do I have to write the daemoon interval in the two config files ? Not just one of them ?
- Can I just set a crontab -e with sudo ddclient -daemon=0 -noquiet each 30 minutes, instead of using the daemoon ?
- Do you see any mistake in the files ?