From 1bf23bd63282ae52802b7a755259a0fc58aa3c01 Mon Sep 17 00:00:00 2001 From: Christian Schoenebeck Date: Sun, 8 May 2016 13:14:45 +0200 Subject: [PATCH] dns-scripts: add DNS lookup support for "drill" and "khost" (Knot DNS) - add DNS lookup support for "drill" and "khost" (Knot DNS) #2637 - new service nsupdate.info (IPv4 and IPv6) #2433 - new services dyndnss.net, dyns.net (IPv4 only) - new services dnshome.de, goip.de, myonlineportal.net (IPv4 and IPv6) Signed-off-by: Christian Schoenebeck --- net/ddns-scripts/Makefile | 4 +-- .../files/dynamic_dns_functions.sh | 26 +++++++++++++++++++ net/ddns-scripts/files/services | 23 ++++++++++++++-- net/ddns-scripts/files/services_ipv6 | 15 ++++++++++- 4 files changed, 63 insertions(+), 5 deletions(-) diff --git a/net/ddns-scripts/Makefile b/net/ddns-scripts/Makefile index 72850c6230..3724d36d5e 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.6.4 +PKG_VERSION:=2.7.1 # Release == build # increase on changes of services files or tld_names.dat -PKG_RELEASE:=3 +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 525719b593..72deca0bf4 100755 --- a/net/ddns-scripts/files/dynamic_dns_functions.sh +++ b/net/ddns-scripts/files/dynamic_dns_functions.sh @@ -971,6 +971,28 @@ get_registered_ip() { __RUNPROG="$__PROG $lookup_host $dns_server >$DATFILE 2>$ERRFILE" __PROG="BIND host" + elif [ -n "$(which khost)" ]; then + __PROG="$(which khost)" + [ $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" + fi + [ $force_dnstcp -eq 1 ] && __PROG="$__PROG -T" # force TCP + + __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 + if [ $force_ipversion -eq 1 ]; then # force IP version + [ $use_ipv6 -eq 0 ] && __PROG="$__PROG -4" || __PROG="$__PROG -6" + fi + [ $force_dnstcp -eq 1 ] && __PROG="$__PROG -t" || __PROG="$__PROG -u" # force TCP + __PROG="$__PROG $lookup_host" + [ -n "$dns_server" ] && __PROG="$__PROG @$dns_server" + [ $use_ipv6 -eq 0 ] && __PROG="$__PROG A" || __PROG="$__PROG AAAA" + + __RUNPROG="$__PROG >$DATFILE 2>$ERRFILE" + __PROG="drill" elif [ -n "$(which hostip)" ]; then # hostip package installed __PROG="$(which hostip)" [ $force_dnstcp -ne 0 ] && \ @@ -1017,6 +1039,10 @@ get_registered_ip() { else if [ "$__PROG" = "BIND host" ]; then __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' ) + elif [ "$__PROG" = "Knot host" ]; then + __DATA=$(cat $DATFILE | awk -F "address " '/has/ {print $2; exit}' ) + elif [ "$__PROG" = "drill" ]; then + __DATA=$(cat $DATFILE | awk '/^'"$lookup_host"'/ {print $5; exit}' ) elif [ "$__PROG" = "hostip" ]; then __DATA=$(cat $DATFILE | grep -m 1 -o "$__REGEX") else diff --git a/net/ddns-scripts/files/services b/net/ddns-scripts/files/services index 8ddfe273af..06307d579e 100644 --- a/net/ddns-scripts/files/services +++ b/net/ddns-scripts/files/services @@ -33,7 +33,7 @@ # # 44444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444444 -"dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" +"dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" "changeip.com" "http://[USERNAME]:[PASSWORD]@nic.changeip.com/nic/update?u=[USERNAME]&p=[PASSWORD]&cmd=update&hostname=[DOMAIN]&ip=[IP]" "zoneedit.com" "http://[USERNAME]:[PASSWORD]@dynamic.zoneedit.com/auth/dynamic.html?host=[DOMAIN]&dnsto=[IP]" "free.editdns.net" "http://dyndns-free.editdns.net/api/dynLinux.php?p=[PASSWORD]&r=[DOMAIN]" @@ -49,7 +49,7 @@ "he.net" "http://[DOMAIN]:[PASSWORD]@dyn.dns.he.net/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" # DNSdynamic.org -"dnsdynamic.org" "http://[USERNAME]:[PASSWORD]@www.dnsdynamic.org/api/?hostname=[DOMAIN]&myip=[IP]" +"dnsdynamic.org" "http://[USERNAME]:[PASSWORD]@www.dnsdynamic.org/api/?hostname=[DOMAIN]&myip=[IP]" "good|nochg" # dnsExit.com free dynamic DNS update url "dnsexit.com" "http://www.dnsexit.com/RemoteUpdate.sv?login=[USERNAME]&password=[PASSWORD]&host=[DOMAIN]&myip=[IP]" @@ -134,3 +134,22 @@ # regfish.de "regfish.de" "http://dyndns.regfish.de/?fqdn=[DOMAIN]&forcehost=1&authtype=secure&token=[PASSWORD]&ipv4=[IP]" "success|100|101" + +# nsupdate.info - a free service - supports https +"nsupdate.info" "http://[USERNAME]:[PASSWORD]@ipv4.nsupdate.info/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" + +# dyndnss.net +"dyndnss.net" "http://www.dyndnss.net/?user=[USERNAME]&pass=[PASSWORD]&domain=[DOMAIN]&updater=other" + +# goip.de +"https://www.goip.de/setip?username=[USERNAME]&password=[PASSWORD]&subdomain=[DOMAIN]&ip6=[IP]" + +# myonlineportal.net +"myonlineportal.net" "http://[USERNAME]:[PASSWORD]@myonlineportal.net/updateddns?hostname=[DOMAIN]&ip=[IP]" "good|nochg" + +# dyns.net +"dyns.net" "http://www.dyns.net/postscript011.php?username=[USERNAME]&password=[PASSWORD]&host=[DOMAIN]&ip=[IP]" "200" + +# dnshome.de +"dnshome.de" ""https://[USERNAME]:[PASSWORD]@www.dnshome.de/dyndns.php?hostname=[DOMAIN]&ip=[IP]" + diff --git a/net/ddns-scripts/files/services_ipv6 b/net/ddns-scripts/files/services_ipv6 index 61c0d2022f..64957bf847 100644 --- a/net/ddns-scripts/files/services_ipv6 +++ b/net/ddns-scripts/files/services_ipv6 @@ -55,7 +55,7 @@ "variomedia.de" "http://[USERNAME]:[PASSWORD]@dyndns.variomedia.de/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" # IPv6 @ Dyn.com -"dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" +"dyndns.org" "http://[USERNAME]:[PASSWORD]@members.dyndns.org/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" # duckdns.org "duckdns.org" "http://www.duckdns.org/update?domains=[DOMAIN]&token=[PASSWORD]&ipv6=[IP]" "OK" @@ -71,3 +71,16 @@ # Mythic Beasts (https://www.mythic-beasts.com) Dynamic DNS "mythic-beasts.com" "http://dnsapi6.mythic-beasts.com/?domain=[USERNAME]&password=[PASSWORD]&command=REPLACE%20[DOMAIN]%2060%20AAAA%20DYNAMIC_IP&origin=." + +# nsupdate.info - a free service - supports https +"nsupdate.info" "http://[USERNAME]:[PASSWORD]@ipv6.nsupdate.info/nic/update?hostname=[DOMAIN]&myip=[IP]" "good|nochg" + +# goip.de +"https://www.goip.de/setip?username=[USERNAME]&password=[PASSWORD]&subdomain=[DOMAIN]&ip6=[IP]" + +# myonlineportal.net +"myonlineportal.net" "http://[USERNAME]:[PASSWORD]@myonlineportal.net/updateddns?hostname=[DOMAIN]&ip6=[IP]" "good|nochg" + +# dnshome.de +"dnshome.de" ""https://[USERNAME]:[PASSWORD]@www.dnshome.de/dyndns.php?hostname=[DOMAIN]&ip6=[IP]" + -- 2.30.2