Merge branch 'ddclient:master' into develop

This commit is contained in:
Awalon 2023-03-26 10:51:02 +02:00 committed by GitHub
commit 2eea3d10ed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
14 changed files with 1066 additions and 500 deletions

View file

@ -3,14 +3,42 @@
This document describes notable changes. For details, see the [source code
repository history](https://github.com/ddclient/ddclient/commits/master).
## Not yet released
## 2023-XX-XX v3.11.0
### Breaking changes
* ddclient no longer ships any example files for init systems that use `/etc/init.d`.
This was done because those files where effectively unmaintained, untested by the developers and only updated by downstream distros.
If you where relying on those files, please copy them into your packaging.
### New features
* Added support for domaindiscount24.com
* Added support for domeneshop.no
* Added support for Enom
* Added support for Mythic Beasts Dynamic DNS
* Added support for njal.la
* Added support for Porkbun
* Added support for IPv6 to the EasyDNS and DuckDNS provider
### Bug fixes
* DynDNS2 now uses the newer ipv4/ipv6 syntax's
* The OVH provider now ignores extra data returned
* Allow to define usev4 and usev6 options per hostname
* Merge multiple configs for the same hostname instead of use the last
## 2022-10-20 v3.10.0
### New features
* Added support for domaindiscount24.com
* Added support for njal.la
## 2022-05-15 v3.10.0_2
### Bug fixes
* Fix version number being unable to parse
## 2022-05-15 v3.10.0_1

View file

@ -6,19 +6,12 @@ EXTRA_DIST = \
ChangeLog.md \
README.cisco \
README.md \
README.ssl \
autogen \
sample-ddclient-wrapper.sh \
sample-etc_cron.d_ddclient \
sample-etc_dhclient-exit-hooks \
sample-etc_dhcpc_dhcpcd-eth0.exe \
sample-etc_ppp_ip-up.local \
sample-etc_rc.d_ddclient.freebsd \
sample-etc_rc.d_init.d_ddclient \
sample-etc_rc.d_init.d_ddclient.alpine \
sample-etc_rc.d_init.d_ddclient.lsb \
sample-etc_rc.d_init.d_ddclient.redhat \
sample-etc_rc.d_init.d_ddclient.ubuntu \
sample-etc_systemd.service \
sample-get-ip-from-fritzbox
CLEANFILES =

View file

@ -1,4 +1,4 @@
# DDCLIENT v3.10.0
# DDCLIENT
`ddclient` is a Perl client used to update dynamic DNS entries for accounts
on many dynamic DNS services.
@ -29,11 +29,17 @@ Dynamic DNS services currently supported include:
DonDominio - See https://www.dondominio.com for details
NearlyFreeSpeech.net - See https://www.nearlyfreespeech.net/services/dns for details
OVH - See https://www.ovh.com for details
Porkbun - See https://porkbun.com/
ClouDNS - See https://www.cloudns.net
dinahosting - See https://dinahosting.com
Gandi - See https://gandi.net
dnsexit - See https://dnsexit.com/ for details
1984.is - See https://www.1984.is/product/freedns/ for details
Njal.la - See https://njal.la/docs/ddns/
regfish.de - See https://www.regfish.de/domains/dyndns/ for details
domenehsop - See https://api.domeneshop.no/docs/#tag/ddns/paths/~1dyndns~1update/get
Mythic Beasts - See https://www.mythic-beasts.com/support/api/dnsv2/dynamic-dns for details
Enom - See https://www.enom.com for details
`ddclient` now supports many cable and DSL broadband routers.
@ -77,8 +83,8 @@ ddclient package.
the directory:
```shell
tar xvfa ddclient-3.10.0.tar.gz
cd ddclient-3.10.0
tar xvfa ddclient-3.XX.X.tar.gz
cd ddclient-3.XX.X
```
(If you are installing from a clone of the Git repository, you
@ -110,82 +116,6 @@ start the first time by hand
systemctl start ddclient.service
#### Redhat style rc files and daemon-mode
cp sample-etc_rc.d_init.d_ddclient /etc/rc.d/init.d/ddclient
enable automatic startup when booting. also check your distribution
/sbin/chkconfig --add ddclient
start the first time by hand
/etc/rc.d/init.d/ddclient start
#### Alpine style rc files and daemon-mode
cp sample-etc_rc.d_init.d_ddclient.alpine /etc/init.d/ddclient
enable automatic startup when booting
rc-update add ddclient
make sure you have perl installed
apk add perl
start the first time by hand
rc-service ddclient start
#### Ubuntu style rc files and daemon-mode
cp sample-etc_rc.d_init.d_ddclient.ubuntu /etc/init.d/ddclient
enable automatic startup when booting
update-rc.d ddclient defaults
make sure you have perl and the required modules installed
apt-get install perl libdata-validate-ip-perl libio-socket-ssl-perl
if you plan to use cloudflare or feedns you need the perl json module
apt-get install libjson-pp-perl
for IPv6 you also need to instal the perl io-socket-inet6 module
apt install libio-socket-inet6-perl
start the first time by hand
service ddclient start
#### FreeBSD style rc files and daemon mode
mkdir -p /usr/local/etc/rc.d
cp sample-etc_rc.d_ddclient.freebsd /usr/local/etc/rc.d/ddclient
enable automatic startup when booting
sysrc ddclient_enable=YES
make sure you have perl and the required modules installed
pkg install perl5 p5-Data-Validate-IP p5-IO-Socket-SSL
if you plan to use cloudflare or feedns you need the perl json module
pkg install p5-JSON-PP
start the service manually for the first time
service ddclient start
If you are not using daemon-mode, configure cron and dhcp or ppp as described below.
## TROUBLESHOOTING
1. enable debugging and verbose messages: ``$ ddclient -daemon=0 -debug -verbose -noquiet``
@ -245,7 +175,7 @@ not become stale.
cp sample-etc_cron.d_ddclient /etc/cron.d/ddclient
vi /etc/cron.d/ddclient
## USING DDCLIENT WITH `dhcpcd-1.3.17`
## USING DDCLIENT WITH `dhcpcd`
If you are using dhcpcd-1.3.17 or thereabouts, you can easily update
your DynDNS entry automatically every time your lease is obtained

View file

@ -1,13 +0,0 @@
Since 3.7.0, ddclient support ssl-updates
To use ssl, put "ssl=yes" in your configuration and make sure
you have IO::Socket::SSL.
On debian, you need libio-socket-ssl-perl to have IO::Socket::SSL
On alpine, you need perl-io-socket-ssl to have IO::Socket::SSL
ssl support is tested on folowing dynamic dns providers:
- dyndns.com
- freemyip.com
- DNS Made Easy
- dondominio.com

View file

@ -1,5 +1,5 @@
AC_PREREQ([2.63])
AC_INIT([ddclient], [3.10.0_2])
AC_INIT([ddclient], [3.11.0])
AC_CONFIG_SRCDIR([ddclient.in])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])

View file

@ -19,12 +19,12 @@
daemon=300 # check every 300 seconds
syslog=yes # log update msgs to syslog
mail=root # mail all msgs to root
mail-failure=root # mail failed update msgs to root
mail-failure=root # mail failed update msgs to root
pid=@runstatedir@/ddclient.pid # record PID in file.
ssl=yes # use ssl-support. Works with
# ssl-library
# postscript=script # run script after updating. The
# new IP is added as argument.
# ssl-library
# postscript=script # run script after updating. The
# new IP is added as argument.
#
#use=watchguard-soho, fw=192.168.111.1:80 # via Watchguard's SOHO FW
#use=netopia-r910, fw=192.168.111.1:80 # via Netopia R910 FW
@ -88,7 +88,6 @@ ssl=yes # use ssl-support. Works with
# protocol=dyndns2 \
# your-static-host.dyndns.org
##
##
## dyndns.org custom addresses
##
@ -154,7 +153,6 @@ ssl=yes # use ssl-support. Works with
# zone=example.com \
# example.com,subdomain.example.com
##
##
## Loopia (loopia.se)
##
@ -297,6 +295,15 @@ ssl=yes # use ssl-support. Works with
# password=your_password
# test.example.com
##
## Porkbun (https://porkbun.com/)
##
# protocol=porkbun
# apikey=APIKey
# secretapikey=SecretAPIKey
# host.example.com,host2.sub.example.com
# on-root-domain=yes example.com,sub.example.com
##
## ClouDNS (https://www.cloudns.net)
##
@ -312,9 +319,49 @@ ssl=yes # use ssl-support. Works with
# password=mypassword \
# myhost.mydomain.com
##
## dnsexit (www.dnsexit.com)
##
#protocol=dnsexit, \
#login=myusername, \
#password=mypassword, \
#subdomain-1.domain.com,subdomain-2.domain.com
##
## domeneshop (www.domeneshop.no)
##
# protocol=domeneshop
# login=<token>
# password=<secret>
# subdomain-1.domain.com,subdomain-2.domain.com
##
## Njal.la (http://njal.la/)
##
# protocol=njalla,
# password=mypassword
# quietreply=no|yes
# my-domain.com
##
## regfish.de (www.regfish.de/)
##
# protocol=regfishde,
# password=mypassword
# my-domain.com
##
## Enom (www.enom.com)
##
# protocol=enom,
# login=domain.name,
# password=domain-password
# my-domain.com
##
## DigitalOcean (www.digitalocean.com)
##
#protocol=digitalocean, \
#zone=example.com, \
#password=api-token \
#example.com,sub.example.com

File diff suppressed because it is too large Load diff

View file

@ -1,31 +0,0 @@
#!/bin/sh
# PROVIDE: ddclient
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# ddclient_enable (bool): Set to NO by default.
# Set it to YES to enable ddclient.
. /etc/rc.subr
name=ddclient
rcvar=ddclient_enable
ddclient_conf="/etc/ddclient/ddclient.conf"
command="/usr/local/sbin/${name}"
load_rc_config $name
delay=$(grep -v '^\s*#' "${ddclient_conf}" | grep -i -m 1 "daemon" | awk -F '=' '{print $2}')
if [ -z "${delay}" ]
then
ddclient_flags="-daemon 300"
else
ddclient_flags=""
fi
run_rc_command "$1"

View file

@ -1,100 +0,0 @@
#!/bin/bash
#
# ddclient This shell script takes care of starting and stopping
# ddclient.
#
# chkconfig: 2345 65 35
# description: ddclient provides support for updating dynamic DNS services.
CONF=/etc/ddclient/ddclient.conf
program=ddclient
[ -f $CONF ] || exit 0
system=unknown
if [ -f /etc/fedora-release ]; then
system=fedora
elif [ -f /etc/redhat-release ]; then
system=redhat
elif [ -f /etc/debian_version ]; then
system=debian
fi
PID=''
if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then
. /etc/init.d/functions
PID=`pidofproc $program`
else
PID=`ps -aef | grep "$program - sleep" | grep -v grep | awk '{print $2}'`
fi
PATH=/usr/bin:/usr/local/bin:${PATH}
export PATH
# See how we were called.
case "$1" in
start)
# See if daemon=value is specified in the config file.
# Assumptions:
# * there are no quoted "#" characters before "daemon="
# (if there is a "#" it starts a comment)
# * "daemon=" does not appear in a password or value
# * if the interval value is 0, it is not quoted
INTERVAL=$(sed -e '
s/^\([^#]*[,[:space:]]\)\{0,1\}daemon=\([^,[:space:]]*\).*$/\2/
t quit
d
:quit
q
' "$CONF")
if [ -z "$DELAY" ] || [ "$DELAY" = "0" ]; then
DELAY="-daemon 300"
else
# use the interval specified in the config file
DELAY=''
fi
echo -n "Starting ddclient: "
if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then
daemon $program $DELAY
else
ddclient $DELAY
fi
echo
;;
stop)
# Stop daemon.
echo -n "Shutting down ddclient: "
if [ -n "$PID" ]; then
if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then
killproc $program
else
kill $PID
fi
else
echo "ddclient is not running"
fi
echo
;;
restart)
$0 stop
$0 start
;;
status)
if [ "$system" = "fedora" ] || [ "$system" = "redhat" ]; then
status $program
else
if test "$PID"; then
for p in $PID; do
echo "$program (pid $p) is running"
done
else
echo "$program is stopped"
fi
fi
;;
*)
echo "Usage: ddclient {start|stop|restart|status}"
exit 1
esac
exit 0

View file

@ -1,38 +0,0 @@
#!/sbin/openrc-run
description="ddclient Daemon for Alpine"
command="/usr/bin/ddclient"
config_file="/etc/ddclient/ddclient.conf"
command_args=""
pidfile=$(grep -v '^\s*#' "${config_file}" | grep -i -m 1 pid= | awk -F '=' '{print $2}')
delay=$(grep -v '^\s*#' "${config_file}" | grep -i -m 1 "daemon" | awk -F '=' '{print $2}')
if [ -z "${delay}" ]
then
command_args="-daemon 300"
else
command_args=""
fi
depend() {
use logger
need net
after firewall
}
start() {
ebegin "Starting ddclient"
start-stop-daemon --start \
--exec "${command}" \
--pidfile "${pidfile}" \
-- \
${command_args}
eend $?
}
stop() {
ebegin "Stopping ddclient"
start-stop-daemon --stop --exec "${command}" \
--pidfile "${pidfile}"
eend $?
}

View file

@ -1,64 +0,0 @@
#!/bin/sh
#
# ddclient This shell script takes care of starting and stopping
# ddclient.
#
# chkconfig: 2345 65 35
# description: ddclient provides support for updating dynamic DNS services.
#
# Above is for RedHat and now the LSB part
### BEGIN INIT INFO
# Provides: ddclient
# Required-Start: $syslog $remote_fs
# Should-Start: $time ypbind sendmail
# Required-Stop: $syslog $remote_fs
# Should-Stop: $time ypbind sendmail
# Default-Start: 3 5
# Default-Stop: 0 1 2 6
# Short-Description: ddclient provides support for updating dynamic DNS services
# Description: ddclient is a Perl client used to update dynamic DNS
# entries for accounts on many dynamic DNS services and
# can be used on many types of firewalls
### END INIT INFO
#
###
[ -f /etc/ddclient/ddclient.conf ] || exit 0
DDCLIENT_BIN=/usr/bin/ddclient
#
# LSB Standard (SuSE,RedHat,...)
#
if [ -f /lib/lsb/init-functions ] ; then
. /lib/lsb/init-functions
fi
# See how we were called.
case "$1" in
start)
echo -n "Starting ddclient "
start_daemon $DDCLIENT_BIN -daemon 300
rc_status -v
;;
stop)
echo -n "Shutting down ddclient "
killproc -TERM `basename $DDCLIENT_BIN`
rc_status -v
;;
restart)
$0 stop
$0 start
rc_status
;;
status)
echo -n "Checking for service ddclient "
checkproc `basename $DDCLIENT_BIN`w
rc_status -v
;;
*)
echo "Usage: ddclient {start|stop|restart|status}"
exit 1
esac
exit 0

View file

@ -1,41 +0,0 @@
#!/bin/sh
#
# ddclient This shell script takes care of starting and stopping
# ddclient.
#
# chkconfig: 2345 65 35
# description: ddclient provides support for updating dynamic DNS services.
[ -f /etc/ddclient/ddclient.conf ] || exit 0
. /etc/rc.d/init.d/functions
# See how we were called.
case "$1" in
start)
# Start daemon.
echo -n "Starting ddclient: "
touch /var/lock/subsys/ddclient
daemon ddclient -daemon 300
echo
;;
stop)
# Stop daemon.
echo -n "Shutting down ddclient: "
killproc ddclient
echo
rm -f /var/lock/subsys/ddclient
;;
restart)
$0 stop
$0 start
;;
status)
status ddclient
;;
*)
echo "Usage: ddclient {start|stop|restart|status}"
exit 1
esac
exit 0

View file

@ -1,57 +0,0 @@
#!/bin/sh
### BEGIN INIT INFO
# Provides: ddclient
# Required-Start: $remote_fs $syslog $network
# Required-Stop: $remote_fs $syslog $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start ddclient daemon at boot time
# Description: Start ddclient that provides support for updating dynamic DNS services. Originally submitted by paolo martinelli, updated by joe passavanti
### END INIT INFO
DDCLIENT=/usr/bin/ddclient
CONF=/etc/ddclient/ddclient.conf
PIDFILE=/var/run/ddclient.pid
test -x $DDCLIENT || exit 0
test -f $CONF || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
if [ ! -f $PIDFILE ]; then
log_begin_msg "Starting ddclient..."
DELAY=`grep -v '^\s*#' $CONF | grep -i -m 1 "daemon" | awk -F '=' '{print $2}'`
if [ -z "$DELAY" ] ; then
DELAY="-daemon 300"
else
DELAY=''
fi
start-stop-daemon -S -q -p $PIDFILE -x $DDCLIENT -- $DELAY
log_end_msg $?
else
log_warning_msg "Service ddclient already running..."
fi
;;
stop)
if [ -f $PIDFILE ] ; then
log_begin_msg "Stopping ddclient..."
start-stop-daemon -K -q -p $PIDFILE
log_end_msg $?
rm -f $PIDFILE
else
log_warning_msg "No ddclient running..."
fi
;;
restart|reload|force-reload)
$0 stop
$0 start
;;
*)
log_success_msg "Usage: $0 {start|stop|restart|reload|force-reload}"
exit 1
;;
esac
exit 0

View file

@ -9,12 +9,13 @@
#
# All credits for this one liner go to the author of this blog:
# http://scytale.name/blog/2010/01/fritzbox-wan-ip
# As the author explains its not required to tamper with the provided IP for the FritzBox
# as it always binds to that address for UPnP.
# Disclaimer: It might be necessary to make the script executable
# Set default hostname to connect to the FritzBox
: ${FRITZ_BOX_HOSTNAME:=fritz.box}
curl -s -H 'Content-Type: text/xml; charset="utf-8"' \
-H 'SOAPAction: urn:schemas-upnp-org:service:WANIPConnection:1#GetExternalIPAddress' \
-d '<?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <u:GetExternalIPAddress xmlns:u="urn:schemas-upnp-org:service:WANIPConnection:1" /></s:Body></s:Envelope>' \
'http://fritz.box:49000/igdupnp/control/WANIPConn1' | \
"http://$FRITZ_BOX_HOSTNAME:49000/igdupnp/control/WANIPConn1" | \
grep -Eo '\<[[:digit:]]{1,3}(\.[[:digit:]]{1,3}){3}\>'