From 01a42ec11079f44cbb155cc73d45ef7927e44a26 Mon Sep 17 00:00:00 2001 From: Christian Schoenebeck Date: Sun, 4 Sep 2016 13:30:09 +0200 Subject: [PATCH] ddns-scripts: Update to 2.7.4 - if local ip cannot be detected or is invalid then do not exit ddns-scripts #2950, using multiple url's to detect local ip not jet implemented - change spdns.de update url and add sydyn.de inside services file #2991 - move transfer- and lookup-program detection to dynamic_dns_functions.sh so run once at startup in stead of at every transfer/lookup - add khost, drill and hostip to verify_host_port() function - updated tld_names.dat Signed-off-by: Christian Schoenebeck --- net/ddns-scripts/Makefile | 4 +- .../files/dynamic_dns_functions.sh | 162 ++++++++----- net/ddns-scripts/files/dynamic_dns_updater.sh | 2 + net/ddns-scripts/files/services | 3 +- net/ddns-scripts/files/services_ipv6 | 3 +- net/ddns-scripts/files/tld_names.dat | 220 ++++++++++++++---- 6 files changed, 288 insertions(+), 106 deletions(-) diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index d32577ecb8..a1c9f96488 100755 --- a/net/ddns-scripts/Makefile +++ b/net/ddns-scripts/Makefile @@ -9,10 +9,10 @@ include $(TOPDIR)/rules.mk PKG_NAME:=ddns-scripts # Version == major.minor.patch # increase on new functionality (minor) or patches (patch) -PKG_VERSION:=2.7.3 +PKG_VERSION:=2.7.4 # Release == build # increase on changes of services files or tld_names.dat -PKG_RELEASE:=2 +PKG_RELEASE:=1 PKG_LICENSE:=GPL-2.0 PKG_MAINTAINER:=Christian Schoenebeck diff --git a/net/ddns-scripts/files/dynamic_dns_functions.sh b/net/ddns-scripts/files/dynamic_dns_functions.sh index 13248edaca..642b3fc301 100755 --- a/net/ddns-scripts/files/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/dynamic_dns_functions.sh @@ -21,7 +21,7 @@ . /lib/functions/network.sh # GLOBAL VARIABLES # -VERSION="2.6.4-1" +VERSION="2.7.4" SECTION_ID="" # hold config's section name VERBOSE_MODE=1 # default mode is log to console, but easily changed with parameter @@ -55,6 +55,38 @@ ERR_UPDATE=0 # error counter on different local and registered ip PID_SLEEP=0 # ProcessID of current background "sleep" +# regular expression to detect IPv4 / IPv6 +# IPv4 0-9 1-3x "." 0-9 1-3x "." 0-9 1-3x "." 0-9 1-3x +IPV4_REGEX="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" +# IPv6 ( ( 0-9a-f 1-4char ":") min 1x) ( ( 0-9a-f 1-4char )optional) ( (":" 0-9a-f 1-4char ) min 1x) +IPV6_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)" + +# detect if called by dynamic_dns_lucihelper.sh script, disable retrys (empty variable == false) +[ "$(basename $0)" = "dynamic_dns_lucihelper.sh" ] && LUCI_HELPER="TRUE" || LUCI_HELPER="" + +# Name Server Lookup Programs +BIND_HOST=$(which host) +KNOT_HOST=$(which khost) +DRILL=$(which drill) +HOSTIP=$(which hostip) +NSLOOKUP=$(which nslookup) +NSLOOKUP_MUSL=$($(which nslookup) localhost 2>&1 | grep -F "(null)") # not empty busybox compiled with musl + +# Transfer Programs +WGET=$(which wget) +WGET_SSL=$(which wget-ssl) + +CURL=$(which curl) +# CURL_SSL not empty then SSL support available +CURL_SSL=$($(which curl) -V 2>/dev/null | grep "Protocols:" | grep -F "https") +# CURL_PROXY not empty then Proxy support available +CURL_PROXY=$(find /lib /usr/lib -name libcurl.so* -exec grep -i "all_proxy" {} 2>/dev/null \;) + +UCLIENT_FETCH=$(which uclient-fetch) +# UCLIENT_FETCH_SSL not empty then SSL support available +UCLIENT_FETCH_SSL=$(find /lib /usr/lib -name libustream-ssl.so* 2>/dev/null) + +# Global configuration settings # allow NON-public IP's ALLOW_LOCAL_IP=$(uci -q get ddns.global.allow_local_ip) || ALLOW_LOCAL_IP=0 @@ -74,19 +106,10 @@ LOGLINES=$((LOGLINES + 1)) # correct sed handling DATE_FORMAT=$(uci -q get ddns.global.date_format) || DATE_FORMAT="%F %R" DATE_PROG="date +'$DATE_FORMAT'" -# regular expression to detect IPv4 / IPv6 -# IPv4 0-9 1-3x "." 0-9 1-3x "." 0-9 1-3x "." 0-9 1-3x -IPV4_REGEX="[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}" -# IPv6 ( ( 0-9a-f 1-4char ":") min 1x) ( ( 0-9a-f 1-4char )optional) ( (":" 0-9a-f 1-4char ) min 1x) -IPV6_REGEX="\(\([0-9A-Fa-f]\{1,4\}:\)\{1,\}\)\(\([0-9A-Fa-f]\{1,4\}\)\{0,1\}\)\(\(:[0-9A-Fa-f]\{1,4\}\)\{1,\}\)" - -# detect if called by dynamic_dns_lucihelper.sh script, disable retrys (empty variable == false) -[ "$(basename $0)" = "dynamic_dns_lucihelper.sh" ] && LUCI_HELPER="TRUE" || LUCI_HELPER="" - # USE_CURL if GNU Wget and cURL installed normally Wget is used by do_transfer() # to change this use global option use_curl '1' USE_CURL=$(uci -q get ddns.global.use_curl) || USE_CURL=0 # read config -[ -x /usr/bin/curl ] || USE_CURL=0 # check for cURL +[ -n "$CURL" ] || USE_CURL=0 # check for cURL # loads all options for a given package and section # also, sets all_option_variables to a list of the variable names @@ -144,7 +167,7 @@ load_all_service_sections() { # starts updater script for all given sections or only for the one given # $1 = interface (Optional: when given only scripts are started # configured for that interface) -# used by /etc/hotplug.d/iface/25-ddns on IFUP +# used by /etc/hotplug.d/iface/95-ddns on IFUP # and by /etc/init.d/ddns start start_daemon_for_all_ddns_sections() { @@ -177,7 +200,7 @@ stop_section_processes() { # stop updater script for all defines sections or only for one given # $1 = interface (optional) -# used by /etc/hotplug.d/iface/25-ddns on 'ifdown' +# used by /etc/hotplug.d/iface/95-ddns on 'ifdown' # and by /etc/init.d/ddns stop # needed because we also need to kill "sleep" child processes stop_daemon_for_all_ddns_sections() { @@ -445,6 +468,8 @@ timeout() { verify_host_port() { local __HOST=$1 local __PORT=$2 + local __NC=$(which nc) + local __NCEXT=$($(which nc) --help 2>&1 | grep "\-w" 2>/dev/null) # busybox nc compiled with extensions local __IP __IPV4 __IPV6 __RUNPROG __PROG __ERR # return codes # 1 system specific error @@ -459,12 +484,23 @@ verify_host_port() { __IPV6=$(echo $__HOST | grep -m 1 -o "$IPV6_REGEX") # if FQDN given get IP address [ -z "$__IPV4" -a -z "$__IPV6" ] && { - if [ -n "$(which host)" ]; then # use BIND host if installed + if [ -n "$BIND_HOST" ]; then # use BIND host if installed __PROG="BIND host" - __RUNPROG="$(which host) -t ANY $__HOST >$DATFILE 2>$ERRFILE" + __RUNPROG="$BIND_HOST $__HOST >$DATFILE 2>$ERRFILE" + elif [ -n "$KNOT_HOST" ]; then # use Knot host if installed + __PROG="Knot host" + __RUNPROG="$KNOT_HOST $__HOST >$DATFILE 2>$ERRFILE" + elif [ -n "$DRILL" ]; then # use drill if installed + __PROG="drill" + __RUNPROG="$DRILL -V0 $__HOST A >$DATFILE 2>$ERRFILE" # IPv4 + __RUNPROG="$__RUNPROG; $DRILL -V0 $__HOST AAAA >>$DATFILE 2>>$ERRFILE" # IPv6 + elif [ -n "$HOSTIP" ]; then # use hostip if installed + __PROG="hostip" + __RUNPROG="$HOSTIP $__HOST >$DATFILE 2>$ERRFILE" # IPv4 + __RUNPROG="$__RUNPROG; $HOSTIP -6 $__HOST >>$DATFILE 2>>$ERRFILE" # IPv6 else # use BusyBox nslookup __PROG="BusyBox nslookup" - __RUNPROG="$(which nslookup) $__HOST >$DATFILE 2>$ERRFILE" + __RUNPROG="$NSLOOKUP $__HOST >$DATFILE 2>$ERRFILE" fi write_log 7 "#> $__RUNPROG" eval $__RUNPROG @@ -476,9 +512,15 @@ verify_host_port() { return 2 } # extract IP address - if [ -x /usr/bin/host ]; then # use BIND host if installed + if [ -n "$BIND_HOST" -o -n "$KNOT_HOST" ]; then # use BIND host or Knot host if installed __IPV4=$(cat $DATFILE | awk -F "address " '/has address/ {print $2; exit}' ) __IPV6=$(cat $DATFILE | awk -F "address " '/has IPv6/ {print $2; exit}' ) + elif [ -n "$DRILL" ]; then # use drill if installed + __IPV4=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5}' | grep -m 1 -o "$IPV4_REGEX") + __IPV6=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5}' | grep -m 1 -o "$IPV6_REGEX") + elif [ -n "$HOSTIP" ]; then # use hostip if installed + __IPV4=$(cat $DATFILE | grep -m 1 -o "$IPV4_REGEX") + __IPV6=$(cat $DATFILE | grep -m 1 -o "$IPV6_REGEX") else # use BusyBox nslookup __IPV4=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV4_REGEX\).*$/\\1/p }") __IPV6=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($IPV6_REGEX\).*$/\\1/p }") @@ -498,10 +540,10 @@ verify_host_port() { # verify nc command # busybox nc compiled without -l option "NO OPT l!" -> critical error - /usr/bin/nc --help 2>&1 | grep -i "NO OPT l!" >/dev/null 2>&1 && \ + $__NC --help 2>&1 | grep -i "NO OPT l!" >/dev/null 2>&1 && \ write_log 12 "Busybox nc (netcat) compiled without '-l' option, error 'NO OPT l!'" # busybox nc compiled with extensions - /usr/bin/nc --help 2>&1 | grep "\-w" >/dev/null 2>&1 && __NCEXT="TRUE" + $__NC --help 2>&1 | grep "\-w" >/dev/null 2>&1 && __NCEXT="TRUE" # connectivity test # run busybox nc to HOST PORT @@ -512,7 +554,7 @@ verify_host_port() { [ $force_ipversion -ne 0 -a $use_ipv6 -ne 0 -o -z "$__IPV4" ] && __IP=$__IPV6 || __IP=$__IPV4 if [ -n "$__NCEXT" ]; then # BusyBox nc compiled with extensions (timeout support) - __RUNPROG="/usr/bin/nc -w 1 $__IP $__PORT $DATFILE 2>$ERRFILE" + __RUNPROG="$__NC -w 1 $__IP $__PORT $DATFILE 2>$ERRFILE" write_log 7 "#> $__RUNPROG" eval $__RUNPROG __ERR=$? @@ -521,7 +563,7 @@ verify_host_port() { write_log 7 "$(cat $ERRFILE)" return 3 else # nc compiled without extensions (no timeout support) - __RUNPROG="timeout 2 -- /usr/bin/nc $__IP $__PORT $DATFILE 2>$ERRFILE" + __RUNPROG="timeout 2 -- $__NC $__IP $__PORT $DATFILE 2>$ERRFILE" write_log 7 "#> $__RUNPROG" eval $__RUNPROG __ERR=$? @@ -635,8 +677,8 @@ do_transfer() { [ $# -ne 1 ] && write_log 12 "Error in 'do_transfer()' - wrong number of parameters" # lets prefer GNU Wget because it does all for us - IPv4/IPv6/HTTPS/PROXY/force IP version - if [ -n "$(which wget-ssl)" -a $USE_CURL -eq 0 ]; then # except global option use_curl is set to "1" - __PROG="$(which wget-ssl) -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile + if [ -n "$WGET_SSL" -a $USE_CURL -eq 0 ]; then # except global option use_curl is set to "1" + __PROG="$WGET_SSL -nv -t 1 -O $DATFILE -o $ERRFILE" # non_verbose no_retry outfile errfile # force network/ip to use for communication if [ -n "$bind_network" ]; then local __BINDIP @@ -671,11 +713,10 @@ do_transfer() { # 2nd choice is cURL IPv4/IPv6/HTTPS # libcurl might be compiled without Proxy or HTTPS Support - elif [ -n "$(which curl)" ]; then - __PROG="$(which curl) -RsS -o $DATFILE --stderr $ERRFILE" + elif [ -n "$CURL" ]; then + __PROG="$CURL -RsS -o $DATFILE --stderr $ERRFILE" # check HTTPS support - /usr/bin/curl -V | grep "Protocols:" | grep -F "https" >/dev/null 2>&1 - [ $? -eq 1 -a $use_https -eq 1 ] && \ + [ -z "$CURL_SSL" -a $use_https -eq 1 ] && \ write_log 13 "cURL: libcurl compiled without https support" # force network/interface-device to use for communication if [ -n "$bind_network" ]; then @@ -705,19 +746,17 @@ do_transfer() { # or check if libcurl compiled with proxy support if [ -z "$proxy" ]; then __PROG="$__PROG --noproxy '*'" - else + elif [ -z "$CURL_PROXY" ]; then # if libcurl has no proxy support and proxy should be used then force ERROR - # libcurl currently no proxy support by default - grep -i "all_proxy" /usr/lib/libcurl.so* >/dev/null 2>&1 || \ - write_log 13 "cURL: libcurl compiled without Proxy support" + write_log 13 "cURL: libcurl compiled without Proxy support" fi __RUNPROG="$__PROG '$__URL'" # build final command __PROG="cURL" # reuse for error logging # uclient-fetch possibly with ssl support if /lib/libustream-ssl.so installed - elif [ -n "$(which uclient-fetch)" ]; then - __PROG="$(which uclient-fetch) -q -O $DATFILE" + elif [ -n "$UCLIENT_FETCH" ]; then + __PROG="$UCLIENT_FETCH -q -O $DATFILE" # force network/ip not supported [ -n "$__BINDIP" ] && \ write_log 14 "uclient-fetch: FORCE binding to specific address not supported" @@ -726,7 +765,7 @@ do_transfer() { [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6" # force IPv4/IPv6 fi # https possibly not supported - [ $use_https -eq 1 -a ! -f /lib/libustream-ssl.so ] && \ + [ $use_https -eq 1 -a -z "$UCLIENT_FETCH_SSL" ] && \ write_log 14 "uclient-fetch: no HTTPS support! Additional install one of ustream-ssl packages" # proxy support [ -z "$proxy" ] && __PROG="$__PROG -Y off" || __PROG="$__PROG -Y on" @@ -744,8 +783,8 @@ do_transfer() { __PROG="uclient-fetch" # reuse for error logging # Busybox Wget or any other wget in search $PATH (did not support neither IPv6 nor HTTPS) - elif [ -n "$(which wget)" ]; then - __PROG="$(which wget) -q -O $DATFILE" + elif [ -n "$WGET" ]; then + __PROG="$WGET -q -O $DATFILE" # force network/ip not supported [ -n "$__BINDIP" ] && \ write_log 14 "BusyBox Wget: FORCE binding to specific address not supported" @@ -806,10 +845,14 @@ send_update() { # verify given IP / no private IPv4's / no IPv6 addr starting with fxxx of with ":" [ $use_ipv6 -eq 0 ] && __IP=$(echo $1 | grep -v -E "(^0|^10\.|^100\.6[4-9]\.|^100\.[7-9][0-9]\.|^100\.1[0-1][0-9]\.|^100\.12[0-7]\.|^127|^169\.254|^172\.1[6-9]\.|^172\.2[0-9]\.|^172\.3[0-1]\.|^192\.168)") [ $use_ipv6 -eq 1 ] && __IP=$(echo $1 | grep "^[0-9a-eA-E]") - [ -z "$__IP" ] && write_log 14 "Private or invalid or no IP '$1' given! Please check your configuration" else - __IP="$1" + __IP=$(echo $1 | grep -m 1 -o "$IPV4_REGEX") # valid IPv4 or + [ -z "$__IP" ] && __IP=$(echo $1 | grep -m 1 -o "$IPV6_REGEX") # IPv6 fi + [ -z "$__IP" ] && { + write_log 3 "No or private or invalid IP '$1' given! Please check your configuration" + return 127 + } if [ -n "$update_script" ]; then write_log 7 "parsing script '$update_script'" @@ -951,19 +994,18 @@ get_registered_ip() { local __CNT=0 # error counter local __ERR=255 local __REGEX __PROG __RUNPROG __DATA __IP - local __MUSL=$(nslookup localhost 2>&1 | grep -qF "(null)"; echo $?) # 0 == busybox compiled with musl "(null)" found # return codes # 1 no IP detected [ $# -lt 1 -o $# -gt 2 ] && write_log 12 "Error calling 'get_registered_ip()' - wrong number of parameters" - [ $is_glue -eq 1 -a -z "$(which host)" ] && write_log 14 "Lookup of glue records is only supported using BIND host" + [ $is_glue -eq 1 -a -z "$BIND_HOST" ] && write_log 14 "Lookup of glue records is only supported using BIND host" write_log 7 "Detect registered/public IP" # set correct regular expression [ $use_ipv6 -eq 0 ] && __REGEX="$IPV4_REGEX" || __REGEX="$IPV6_REGEX" - if [ -n "$(which host)" ]; then - __PROG="$(which host)" + if [ -n "$BIND_HOST" ]; then + __PROG="$BIND_HOST" [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -t A" || __PROG="$__PROG -t AAAA" if [ $force_ipversion -eq 1 ]; then # force IP version [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6" @@ -973,8 +1015,8 @@ get_registered_ip() { __RUNPROG="$__PROG $lookup_host $dns_server >$DATFILE 2>$ERRFILE" __PROG="BIND host" - elif [ -n "$(which khost)" ]; then - __PROG="$(which khost)" + elif [ -n "$KNOT_HOST" ]; then + __PROG="$KNOT_HOST" [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -t A" || __PROG="$__PROG -t AAAA" if [ $force_ipversion -eq 1 ]; then # force IP version [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6" @@ -983,8 +1025,8 @@ get_registered_ip() { __RUNPROG="$__PROG $lookup_host $dns_server >$DATFILE 2>$ERRFILE" __PROG="Knot host" - elif [ -n "$(which drill)" ]; then - __PROG="$(which drill) -V0" # drill options name @server type + elif [ -n "$DRILL" ]; then + __PROG="$DRILL -V0" # drill options name @server type if [ $force_ipversion -eq 1 ]; then # force IP version [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6" fi @@ -995,8 +1037,8 @@ get_registered_ip() { __RUNPROG="$__PROG >$DATFILE 2>$ERRFILE" __PROG="drill" - elif [ -n "$(which hostip)" ]; then # hostip package installed - __PROG="$(which hostip)" + elif [ -n "$HOSTIP" ]; then # hostip package installed + __PROG="$HOSTIP" [ $force_dnstcp -ne 0 ] && \ write_log 14 "hostip - no support for 'DNS over TCP'" @@ -1006,7 +1048,7 @@ get_registered_ip() { # we got NO ip for dns_server, so build command [ -z "$__IP" -a -n "$dns_server" ] && { - __IP="\`/usr/bin/hostip" + __IP="\`$HOSTIP" [ $use_ipv6 -eq 1 -a $force_ipversion -eq 1 ] && __IP="$__IP -6" __IP="$__IP $dns_server | grep -m 1 -o" [ $use_ipv6 -eq 1 -a $force_ipversion -eq 1 ] \ @@ -1019,13 +1061,13 @@ get_registered_ip() { [ -n "$dns_server" ] && __PROG="$__PROG -r $__IP" __RUNPROG="$__PROG $lookup_host >$DATFILE 2>$ERRFILE" __PROG="hostip" - elif [ -n "$(which nslookup)" ]; then # last use BusyBox nslookup + elif [ -n "$NSLOOKUP" ]; then # last use BusyBox nslookup [ $force_ipversion -ne 0 -o $force_dnstcp -ne 0 ] && \ write_log 14 "Busybox nslookup - no support to 'force IP Version' or 'DNS over TCP'" - [ $__MUSL -eq 0 -a -n "$dns_server" ] && \ - write_log 14 "Busybox compiled with musl - nslookup - no support to set/use DNS Server" + [ -n "$NSLOOKUP_MUSL" -a -n "$dns_server" ] && \ + write_log 14 "Busybox compiled with musl - nslookup don't support the use of DNS Server" - __RUNPROG="$(which nslookup) $lookup_host $dns_server >$DATFILE 2>$ERRFILE" + __RUNPROG="$NSLOOKUP $lookup_host $dns_server >$DATFILE 2>$ERRFILE" __PROG="BusyBox nslookup" else # there must be an error write_log 12 "Error in 'get_registered_ip()' - no supported Name Server lookup software accessible" @@ -1039,19 +1081,19 @@ get_registered_ip() { write_log 3 "$__PROG error: '$__ERR'" write_log 7 "$(cat $ERRFILE)" else - if [ "$__PROG" = "BIND host" ]; then + if [ -n "$BIND_HOST" ]; then if [ $is_glue -eq 1 ]; then __DATA=$(cat $DATFILE | grep "^$lookup_host" | grep -m 1 -o "$__REGEX" ) else __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' ) fi - elif [ "$__PROG" = "Knot host" ]; then + elif [ -n "$KNOT_HOST" ]; then __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' ) - elif [ "$__PROG" = "drill" ]; then + elif [ -n "$DRILL" ]; then __DATA=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5; exit}' ) - elif [ "$__PROG" = "hostip" ]; then + elif [ -n "$HOSTIP" ]; then __DATA=$(cat $DATFILE | grep -m 1 -o "$__REGEX") - else + elif [ -n "$NSLOOKUP" ]; then __DATA=$(cat $DATFILE | sed -ne "/^Name:/,\$ { s/^Address[0-9 ]\{0,\}: \($__REGEX\).*$/\\1/p }" ) fi [ -n "$__DATA" ] && { @@ -1211,14 +1253,14 @@ split_FQDN() { expand_ipv6() { # Original written for bash by - # Author: Florian Streibelt + #.Author: Florian Streibelt # Date: 08.04.2012 # License: Public Domain, but please be fair and # attribute the original author(s) and provide # a link to the original source for corrections: #. https://github.com/mutax/IPv6-Address-checks - # $1 IPv6 t0 expand + # $1 IPv6 to expand # $2 name of variable to store expanded IPv6 [ $# -ne 2 ] && write_log 12 "Error calling 'expand_ipv6()' - wrong number of parameters" diff --git a/net/ddns-scripts/files/dynamic_dns_updater.sh b/net/ddns-scripts/files/dynamic_dns_updater.sh index b509d99054..a4fb820f78 100755 --- a/net/ddns-scripts/files/dynamic_dns_updater.sh +++ b/net/ddns-scripts/files/dynamic_dns_updater.sh @@ -314,6 +314,8 @@ while : ; do [ "$LOCAL_IP" != "$REGISTERED_IP" ] \ && write_log 6 "Update successful - IP '$LOCAL_IP' send" \ || write_log 6 "Forced update successful - IP: '$LOCAL_IP' send" + elif [ $ERR_LAST -eq 127 ]; then + write_log 3 "No update send to DDNS Provider" else write_log 3 "IP update not accepted by DDNS Provider" fi diff --git a/net/ddns-scripts/files/services b/net/ddns-scripts/files/services index 1737dac00f..e6f76d75ce 100644 --- a/net/ddns-scripts/files/services +++ b/net/ddns-scripts/files/services @@ -76,7 +76,8 @@ "mythic-beasts.com" "http://dnsapi4.mythic-beasts.com/?domain=[USERNAME]&password=[PASSWORD]&command=REPLACE%20[DOMAIN]%2060%20A%20DYNAMIC_IP&origin=." # Securepoint Dynamic-DNS-Service (http://www.spdns.de) -"spdns.de" "http://[USERNAME]:[PASSWORD]@update.spdns.de/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"spdns.de" "http://[USERNAME]:[PASSWORD]@update.spdyn.de/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"spdyn.de" "http://[USERNAME]:[PASSWORD]@update.spdyn.de/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" # duiadns.net - free dynamic DNS "duiadns.net" "http://ipv4.duia.ro/dynamic.duia?host=[DOMAIN]&password=[PASSWORD]&ip4=[IP]" diff --git a/net/ddns-scripts/files/services_ipv6 b/net/ddns-scripts/files/services_ipv6 index 82abb68924..558da7d4eb 100644 --- a/net/ddns-scripts/files/services_ipv6 +++ b/net/ddns-scripts/files/services_ipv6 @@ -34,7 +34,8 @@ # 66666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666666 # IPv6 @ Securepoint Dynamic-DNS-Service -"spdns.de" "http://[USERNAME]:[PASSWORD]@update.spdns.de/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"spdns.de" "http://[USERNAME]:[PASSWORD]@update.spdyn.de/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" +"spdyn.de" "http://[USERNAME]:[PASSWORD]@update.spdyn.de/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" # IPv6 @ Hurricane Electric Dynamic DNS "he.net" "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" diff --git a/net/ddns-scripts/files/tld_names.dat b/net/ddns-scripts/files/tld_names.dat index e096ba7452..9aa9cd214a 100644 --- a/net/ddns-scripts/files/tld_names.dat +++ b/net/ddns-scripts/files/tld_names.dat @@ -2,6 +2,11 @@ // License, v. 2.0. If a copy of the MPL was not distributed with this // file, You can obtain one at https://mozilla.org/MPL/2.0/. +// Please pull this list from, and only from https://publicsuffix.org/list/public_suffix_list.dat , +// rather than any other VCS sites. Pulling from any other URL is not guaranteed to be supported. + +// Instructions on pulling and using this list can be found at https://publicsuffix.org/list/ . + // ===BEGIN ICANN DOMAINS=== // ac : https://en.wikipedia.org/wiki/.ac @@ -2613,7 +2618,6 @@ hitoyoshi.kumamoto.jp kamiamakusa.kumamoto.jp kashima.kumamoto.jp kikuchi.kumamoto.jp -kosa.kumamoto.jp kumamoto.kumamoto.jp mashiki.kumamoto.jp mifune.kumamoto.jp @@ -6777,7 +6781,7 @@ lib.ca.us lib.co.us lib.ct.us lib.dc.us -lib.de.us +// lib.de.us Issue #243 - Moved to Private section at request of Ed Moore lib.fl.us lib.ga.us lib.gu.us @@ -7255,7 +7259,7 @@ sch.zm *.zw -// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2016-05-09T22:17:27Z +// List of new gTLDs imported from https://newgtlds.icann.org/newgtlds.csv on 2016-08-17T00:17:46Z // aaa : 2015-02-26 American Automobile Association, Inc. aaa @@ -7332,9 +7336,6 @@ afl // africa : 2014-03-24 ZA Central Registry NPC trading as Registry.Africa africa -// africamagic : 2015-03-05 Electronic Media Network (Pty) Ltd -africamagic - // agakhan : 2015-04-23 Fondation Aga Khan (Aga Khan Foundation) agakhan @@ -7614,7 +7615,7 @@ blanco // blockbuster : 2015-07-30 Dish DBS Corporation blockbuster -// blog : 2015-05-14 PRIMER NIVEL S.A. +// blog : 2015-05-14 blog // bloomberg : 2014-07-17 Bloomberg IP Holdings LLC @@ -8040,6 +8041,9 @@ dad // dance : 2013-10-24 United TLD Holdco Ltd. dance +// data : 2016-06-02 Dish DBS Corporation +data + // date : 2014-11-20 dot Date Limited date @@ -8136,6 +8140,9 @@ dnp // docs : 2014-10-16 Charleston Road Registry Inc. docs +// doctor : 2016-06-02 Brice Trail, LLC +doctor + // dodge : 2015-07-30 FCA US LLC. dodge @@ -8157,9 +8164,6 @@ download // drive : 2015-03-05 Charleston Road Registry Inc. drive -// dstv : 2015-03-12 MultiChoice (Proprietary) Limited -dstv - // dtv : 2015-06-04 Dish DBS Corporation dtv @@ -8184,6 +8188,9 @@ durban // dvag : 2014-06-23 Deutsche Vermögensberatung Aktiengesellschaft DVAG dvag +// dvr : 2016-05-26 Hughes Satellite Systems Corporation +dvr + // dwg : 2015-07-23 Autodesk, Inc. dwg @@ -8193,6 +8200,9 @@ earth // eat : 2014-01-23 Charleston Road Registry Inc. eat +// eco : 2016-07-08 Big Room Inc. +eco + // edeka : 2014-12-18 EDEKA Verband kaufmännischer Genossenschaften e.V. edeka @@ -8376,9 +8386,6 @@ florist // flowers : 2014-10-09 Uniregistry, Corp. flowers -// flsmidth : 2014-07-24 FLSmidth A/S -flsmidth - // fly : 2014-05-08 Charleston Road Registry Inc. fly @@ -8469,7 +8476,7 @@ gallup // game : 2015-05-28 Uniregistry, Corp. game -// games : 2015-05-28 Foggy Beach, LLC +// games : 2015-05-28 games // gap : 2015-07-31 The Gap, Inc. @@ -8571,9 +8578,6 @@ gop // got : 2014-12-18 Amazon EU S.à r.l. got -// gotv : 2015-03-12 MultiChoice (Proprietary) Limited -gotv - // grainger : 2015-05-07 Grainger Registry Services, LLC grainger @@ -8589,6 +8593,9 @@ green // gripe : 2014-03-06 Corn Sunset, LLC gripe +// grocery : 2016-06-16 Wal-Mart Stores, Inc. +grocery + // group : 2014-08-15 Romeo Town, LLC group @@ -8952,9 +8959,6 @@ kred // kuokgroup : 2015-04-09 Kerry Trading Co. Limited kuokgroup -// kyknet : 2015-03-05 Electronic Media Network (Pty) Ltd -kyknet - // kyoto : 2014-11-07 Academic Institution: Kyoto Jyoho Gakuen kyoto @@ -9159,6 +9163,9 @@ management // mango : 2013-10-24 PUNTO FA S.L. mango +// map : 2016-06-09 Charleston Road Registry Inc. +map + // market : 2014-03-06 market @@ -9219,6 +9226,9 @@ menu // meo : 2014-11-07 PT Comunicacoes S.A. meo +// merckmsd : 2016-07-14 MSD Registry Holdings, Inc. +merckmsd + // metlife : 2015-05-07 MetLife Services and Solutions, LLC metlife @@ -9249,8 +9259,8 @@ mls // mma : 2014-11-07 MMA IARD mma -// mnet : 2015-03-05 Electronic Media Network (Pty) Ltd -mnet +// mobile : 2016-06-02 Dish DBS Corporation +mobile // mobily : 2014-12-18 GreenTech Consultancy Company W.L.L. mobily @@ -9318,18 +9328,12 @@ mtpc // mtr : 2015-03-12 MTR Corporation Limited mtr -// multichoice : 2015-03-12 MultiChoice (Proprietary) Limited -multichoice - // mutual : 2015-04-02 Northwestern Mutual MU TLD Registry, LLC mutual // mutuelle : 2015-06-18 Fédération Nationale de la Mutualité Française mutuelle -// mzansimagic : 2015-03-05 Electronic Media Network (Pty) Ltd -mzansimagic - // nab : 2015-08-20 National Australia Bank Limited nab @@ -9339,9 +9343,6 @@ nadex // nagoya : 2013-10-24 GMO Registry, Inc. nagoya -// naspers : 2015-02-12 Intelprop (Proprietary) Limited -naspers - // nationwide : 2015-07-23 Nationwide Mutual Insurance Company nationwide @@ -9504,7 +9505,7 @@ orange // organic : 2014-03-27 Afilias Limited organic -// orientexpress : 2015-02-05 Belmond Ltd. +// orientexpress : 2015-02-05 orientexpress // origins : 2015-10-01 The Estée Lauder Companies Inc. @@ -9555,9 +9556,6 @@ passagens // pay : 2015-08-27 Amazon EU S.à r.l. pay -// payu : 2015-02-12 MIH PayU B.V. -payu - // pccw : 2015-05-14 PCCW Enterprises Limited pccw @@ -9570,9 +9568,15 @@ pfizer // pharmacy : 2014-06-19 National Association of Boards of Pharmacy pharmacy +// phd : 2016-07-28 Charleston Road Registry Inc. +phd + // philips : 2014-11-07 Koninklijke Philips N.V. philips +// phone : 2016-06-02 Dish DBS Corporation +phone + // photo : 2013-11-14 Uniregistry, Corp. photo @@ -9708,6 +9712,9 @@ qvc // racing : 2014-12-04 Premier Registry Limited racing +// radio : 2016-07-21 European Broadcasting Union (EBU) +radio + // raid : 2015-07-23 Johnson Shareholdings, Inc. raid @@ -9930,6 +9937,9 @@ scor // scot : 2014-01-23 Dot Scot Registry Limited scot +// search : 2016-06-09 Charleston Road Registry Inc. +search + // seat : 2014-05-22 SEAT, S.A. (Sociedad Unipersonal) seat @@ -10143,9 +10153,6 @@ style // sucks : 2014-12-22 Vox Populi Registry Inc. sucks -// supersport : 2015-03-05 SuperSport International Holdings Proprietary Limited -supersport - // supplies : 2013-12-19 Atomic Fields, LLC supplies @@ -11035,6 +11042,10 @@ zuerich // ===BEGIN PRIVATE DOMAINS=== // (Note: these are in alphabetical order by company name) +// Agnat sp. z o.o. : https://domena.pl +// Submitted by Przemyslaw Plewa +beep.pl + // Alces Software Ltd : http://alces-software.com // Submitted by Mark J. Titorenko *.compute.estate @@ -11057,10 +11068,10 @@ sa-east-1.compute.amazonaws.com us-gov-west-1.compute.amazonaws.com us-west-1.compute.amazonaws.com us-west-2.compute.amazonaws.com -us-east-1.amazonaws.com compute-1.amazonaws.com z-1.compute-1.amazonaws.com z-2.compute-1.amazonaws.com +us-east-1.amazonaws.com compute.amazonaws.com.cn cn-north-1.compute.amazonaws.com.cn @@ -11098,23 +11109,43 @@ on-aptible.com // Association potager.org : https://potager.org/ // Submitted by Lunar -potager.org +pimienta.org poivron.org +potager.org sweetpepper.org -pimienta.org + +// ASUSTOR Inc. : http://www.asustor.com +// Submitted by Vincent Tseng +myasustor.com // AVM : https://avm.de // Submitted by Andreas Weise myfritz.net +// backplane : https://www.backplane.io +// Submitted by Anthony Voutas +backplaneapp.io + // BetaInABox // Submitted by Adrian betainabox.com +// BinaryLane : http://www.binarylane.com +// Submitted by Nathan O'Sullivan +bnr.la + // Boxfuse : https://boxfuse.com // Submitted by Axel Fontaine boxfuse.io +// BrowserSafetyMark +// Submitted by Dave Tharp +browsersafetymark.io + +// callidomus: https://www.callidomus.com/ +// Submitted by Marcus Popp +mycd.eu + // CentralNic : http://www.centralnic.com/names/domains // Submitted by registry ae.org @@ -11169,10 +11200,18 @@ co.com // c.la : http://www.c.la/ c.la +// certmgr.org : https://certmgr.org +// Submitted by B. Blechschmidt +certmgr.org + // Citrix : https://citrix.com // Submitted by Alex Stoddard xenapponazure.com +// ClearVox : http://www.clearvox.nl/ +// Submitted by Leon Rowland +virtueeldomein.nl + // cloudControl : https://www.cloudcontrol.com/ // Submitted by Tobias Wilken cloudcontrolled.com @@ -11201,6 +11240,14 @@ co.no // Submitted by Damien Tournoud *.platform.sh +// Craynic, s.r.o. : http://www.craynic.com/ +// Submitted by Ales Krajnik +realm.cz + +// Cryptonomic : https://cryptonomic.net/ +// Submitted by Andrew Cady +*.cryptonomic.net + // Cupcake : https://cupcake.io/ // Submitted by Jonathan Rudenberg cupcake.is @@ -11238,6 +11285,11 @@ dreamhosters.com // Submitted by Ricardo Padilha mydrobo.com +// Drud Holdings, LLC. : https://www.drud.com/ +// Submitted by Kevin Bridges +drud.io +drud.us + // DuckDNS : http://www.duckdns.org/ // Submitted by Richard Harper duckdns.org @@ -11595,6 +11647,13 @@ tr.eu.org uk.eu.org us.eu.org +// Evennode : http://www.evennode.com/ +// Submitted by Michal Kralik +eu-1.evennode.com +eu-2.evennode.com +us-1.evennode.com +us-2.evennode.com + // Facebook, Inc. // Submitted by Peter Ruibal apps.fbsbx.com @@ -11607,6 +11666,10 @@ global.ssl.fastly.net a.prod.fastly.net global.prod.fastly.net +// Featherhead : https://featherhead.xyz/ +// Submitted by Simon Menke +fhapp.xyz + // Firebase, Inc. // Submitted by Chris Raynor firebaseapp.com @@ -11638,9 +11701,15 @@ githubcloud.com gist.githubcloud.com *.githubcloudusercontent.com +// GitLab, Inc. +// Submitted by Alex Hanselka +gitlab.io + // GlobeHosting, Inc. // Submitted by Zoltan Egresi ro.com +ro.im +shop.ro // GoIP DNS Services : http://www.goip.de // Submitted by Christian Poulter @@ -11739,6 +11808,10 @@ hashbang.sh // Submitted by Shahidh K Muhammed hasura-app.io +// Hepforge : https://www.hepforge.org +// Submitted by David Grellscheid +hepforge.org + // Heroku : https://www.heroku.com/ // Submitted by Tom Maher herokuapp.com @@ -11752,6 +11825,28 @@ iki.fi biz.at info.at +// Joyent : https://www.joyent.com/ +// Submitted by Brian Bennett +*.triton.zone +*.cns.joyent.com + +// JS.ORG : http://dns.js.org +// Submitted by Stefan Keim +js.org + +// .KRD : http://nic.krd/data/krd/Registration%20Policy.pdf +co.krd +edu.krd + +// Magento Commerce +// Submitted by Damien Tournoud +*.magentosite.cloud + +// Meteor Development Group : https://www.meteor.com/hosting +// Submitted by Pierre Carrier +meteorapp.com +eu.meteorapp.com + // Michau Enterprises Limited : http://www.co.pl/ co.pl @@ -11927,6 +12022,10 @@ xen.prgmr.com // Submitted by registry priv.at +// Protonet GmbH : http://protonet.io +// Submitted by Martin Meier +protonet.io + // Publication Presse Communication SARL : https://ppcom.fr // Submitted by Yaacov Akiba Slama chirurgiens-dentistes-en-france.fr @@ -11935,6 +12034,12 @@ chirurgiens-dentistes-en-france.fr // Submitted by Daniel Dent (https://www.danieldent.com/) qa2.com +// QNAP System Inc : https://www.qnap.com +// Submitted by Nick Chang +dev-myqnapcloud.com +alpha-myqnapcloud.com +myqnapcloud.com + // Rackmaze LLC : https://www.rackmaze.com // Submitted by Kirill Pertsev rackmaze.com @@ -11952,12 +12057,21 @@ hzc.io // Submitted by Asheesh Laroia sandcats.io +// SBE network solutions GmbH : https://www.sbe.de/ +// Submitted by Norman Meilick +logoip.de +logoip.com + // Service Online LLC : http://drs.ua/ // Submitted by Serhii Bulakh biz.ua co.ua pp.ua +// Shopblocks : http://www.shopblocks.com/ +// Submitted by Alex Bowers +myshopblocks.com + // SinaAppEngine : http://sae.sina.com.cn/ // Submitted by SinaAppEngine sinaapp.com @@ -11970,10 +12084,20 @@ bounty-full.com alpha.bounty-full.com beta.bounty-full.com +// staticland : https://static.land +// Submitted by Seth Vincent +static.land +dev.static.land +sites.static.land + // SpaceKit : https://www.spacekit.io/ // Submitted by Reza Akhavan spacekit.io +// Stackspace : https://www.stackspace.io/ +// Submitted by Lina He +stackspace.space + // Synology, Inc. : https://www.synology.com/ // Submitted by Rony Weng diskstation.me @@ -11997,11 +12121,15 @@ gdynia.pl med.pl sopot.pl -// TownNews.com domains : http://www.townnews.com +// TownNews.com : http://www.townnews.com // Submitted by Dustin Ward bloxcms.com townnews-staging.com +// TuxFamily : http://tuxfamily.org +// Submitted by TuxFamily administrators +tuxfamily.org + // UDR Limited : http://www.udr.hk.com // Submitted by registry hk.com @@ -12009,10 +12137,18 @@ hk.org ltd.hk inc.hk +// .US +// Submitted by Ed Moore +lib.de.us + // Viprinet Europe GmbH : http://www.viprinet.com // Submitted by Simon Kissel router.management +// Wikimedia Labs : https://wikitech.wikimedia.org +// Submitted by Yuvi Panda +wmflabs.org + // Yola : https://www.yola.com/ // Submitted by Stefano Rivera yolasite.com -- 2.30.2