aboutsummaryrefslogtreecommitdiff
path: root/net/ddns-scripts/files/dynamic_dns_functions.sh
Commit message (Collapse)AuthorAge
* ddns-scripts: update dynamic_dns_*.sh installationFlorian Eckert2020-09-21
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* ddns-scripts: write version string during installation into fileFlorian Eckert2020-09-21
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* ddns-scripts: load ddsn service provider parameter from jsonFlorian Eckert2020-09-21
| | | | Signed-off-by: Florian Eckert <fe@dev.tdt.de>
* treewide: replace `which` with `command -v`Paul Spooren2020-08-09
| | | | | | | | | | Fix shellcheck SC2230 > which is non-standard. Use builtin 'command -v' instead. Once applied to everything concerning OpenWrt we can disable the busybox feature `which` and save 3.8kB. Signed-off-by: Paul Spooren <mail@aparcar.org>
* ddns-scripts: fix logging bugRosen Penev2020-02-28
| | | | | | | Fixes issue #11282, this patch was provided by PaulFertser on the #openwrt IRC. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* ddns-scripts: Change protocols of afraid.org urls to HTTPS.Kwonjin Jeong2019-12-01
| | | | | | | - Use HTTPS protocol for updating urls for afraid.org to protect the password. - Bump/align package version number. Signed-off-by: Kwonjin Jeong <gram25gwh@gmail.com>
* ddns-scripts: various fixesDirk Brenken2019-07-03
| | | | | | | | | | | * use '$ddns_rundir' in 'get_service_data' for pipe creation, fix #8971 * add missing local variables in 'get_service_data' * change DNS server verification with drill in 'verify_host_port', fix/supersed #8935 * remove needless cat calls in 'verify_host_port' * set cloudfare TTL to min. 120 seconds, fix #7745 * bump/align package version number Signed-off-by: Dirk Brenken <dev@brenken.org>
* ddns-scripts: add hsts-file parameter to wget callJan Pavlinec2019-03-25
| | | | | | | Note: this should prevent wget to writing to /root/.wget-hsts which can lead to flash memory degradation. Signed-off-by: Jan Pavlinec <jan.pavlinec@nic.cz>
* ddns-scripts: submit one change at a time to route53Martin Konrad2018-11-23
| | | | | | | This prevents updates from failing if multiple instances of the script are running in parallel. This fixes #7492. Signed-off-by: Martin Konrad <info@martin-konrad.net>
* ddns-scripts: multiple fixesDirk Brenken2018-09-28
| | | | | | | | | | | | | * replace shell based urlencoder with an awk variant * fix write_log function/syslog output in case of an error * protect answer string with double quotes in update_route53 * remove bogus set/IFS options in update_route53 * clean-up update_route53 a little bit This patchset finally fix #6977 Many thanks to @mark0n & @a-bali for testing & debugging Signed-off-by: Dirk Brenken <dev@brenken.org>
* ddns-scripts: Respect config option 'ip_source'Jacek Politowski2018-08-27
| | | | | | | | | | | | | | | Option 'ip_source' was silently ignored during public IP discovery. Discovery (in spite of chosen 'ip_source') was based only on 'ip_network', 'ip_interface', 'ip_script' or 'ip_url' options (in this order) if they were set. This could lead to misleading log entries "Detect local IP on '$ip_source'" pointing to source that wasn't really used. Now only option relevant to configured 'ip_source' is taken into account. Signed-off-by: Jacek Politowski <dev@jpol.net.pl>
* ddns-scripts: revert latest noglob/subshell changesDirk Brenken2018-08-26
| | | | | | | * partly revert 9e79e1b to fix #6861 * simplify CURL_SSL detection * bump package version in Makefile & script library Signed-off-by: Dirk Brenken <dev@brenken.org>
* Merge pull request #6747 from mark0n/fix-curl-variableDirk Brenken2018-08-20
|\ | | | | ddns-scripts: Fix problems detecting if curl is SSL capable
| * ddns-scripts_route53-v1: Fix problems detecting curlMartin Konrad2018-08-20
| | | | | | | | | | | | | | Ensure cURL is installed and has SSL support. This fixes issue 6744. Signed-off-by: Martin Konrad <info@martin-konrad.net>
* | Merge pull request #6562 from KarlVogel/host_sanitizeJo-Philipp Wich2018-08-16
|\ \ | |/ |/| ddns-scripts: sanitize host charset and shell escape characters
| * ddns-scripts: sanitize host charset and shell escape charactersKarl Vogel2018-07-25
| | | | | | | | | | | | | | | | | | | | | | Since certain characters are dangerous to pass as-is to a sub shell, sanitize the character set and only allow characters that are considered valid for DNS hosts and filter shell escape characters on generic parameters. Disable pathname expansion on RUNPROG evals to disable the shell expanding *, ? and [ in the arguments. Signed-off-by: Karl Vogel <karl.vogel@gmail.com>
* | ddns-scripts: bump to version 2.7.8-1Christian Schoenebeck2018-08-01
|/ | | | | | | | | | - remove Cloudflare v1 protocol support #6084 #6519 - fix goip.de update url #6448 #6519 - change Cloudflare v4 to read "Proxied" from current setting at Cloudflare Dashboard #5097 #6364 #6505 - fix replace of password inside logfile #6568 - remove myself as PKG_MAINTAINER Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: fix unefficent sh scriptAnsuel Smith2018-06-02
| | | | | | Currently this 3 variable are used only 1 time in the sh script and cause 10s of delay for them to load... move them to load only if it's required by the command. This also fix luci-app-ddns delay problem derived by calling dns_lucihelper (that use tdns_functions to load data) for the version. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
* ddns-scripts: fixes "sed: no previous regexp"Christian Schoenebeck2018-04-21
| | | | | | | | | | | | | | | | | | Rewritten Pull for #5885 When ran from the command line, the script prints error messages like below. They are caused by supplying empty "$password" and "$URL_PASS" for some log messages like "130822 : Detect local IP on 'interface'". The fix is to check if the values are not empty before running through sed. /etc/init.d/ddns start sed: no previous regexp Reported by Marc Benoit <marcb62185@gmail.com> Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: fix incompatibility with luci-app-ddns <= V.2.4.8-2Christian Schoenebeck2018-01-14
| | | | | | fix incompatibility with luci-app-ddns versions <= 2.4.8-2 (#5430) Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: multiple fixesChristian Schoenebeck2018-01-13
| | | | | | | | | | | | | Write *.ip file with current registered IP, whenever "get_registered_IP" is called (used by next luci-app-ddns version) Changed detection of cURL proxy support #3876 Reread data from ubus if "get_local_ip" from "ip_network" #5004 #3338 Fix godaddy_com_v1 #5285 Implement "param_opt" for "cloudflare_com_v4" #5097 Inside logfile "*password*" printed in stead of real password #5281 and others Add ipv4 service "dnsever.com" #5178 Add ipv4 service "myip.co.ua" #5199 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: New update url for service duiadns.netChristian Schoenebeck2017-02-09
| | | | | | | - new update url for service "duiadns.net" - updated public_suffix_list.dat Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: 2nd fix detecting local ip from ip commandChristian Schoenebeck2017-01-16
| | | | Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: fix detecting local ip from ip commandChristian Schoenebeck2017-01-15
| | | | | | fix detecting local ip from ip command #3834 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: fixes for nslookup and khostChristian Schoenebeck2017-01-11
| | | | | | | - fix ip extraction if knot host is used together with glue records - fix ip extraction from nslookup if reverse dns record has ip with dot reported at http://forum.lede-project.org/t/ddns-scripts-error/909 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: make cloudflare v1 same "domain" parameter syntaxChristian Schoenebeck2017-01-09
| | | | | | | | | - cloudflare v1 change syntax of option domain to "host.sub@example.com" like already cloudflare v4 and godaddy to prepare logterm remove of public_suffix_list.dat from package - change Makefile to be backportable to CC15.05 and working on DD - change ddns.defaults to prepare future releases of ddns-scripts - minor fixes Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: fixes for cloudflare v4Christian Schoenebeck2016-12-18
| | | | | | | - update_cloudflare_com_v4.sh: enclose urls in single quotes - dynamic_dns_functions.sh: force to return only one ip, if using nslookup to get registered ip Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: set default verbose=0 so scripts run in backgroundChristian Schoenebeck2016-12-12
| | | | | | fix #3645 and https://github.com/lede-project/source/pull/596#issuecomment-266395456 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: various fixesChristian Schoenebeck2016-12-05
| | | | | | fixes reported in #3621 #3617 #3616 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: update to 2.7.6-1Christian Schoenebeck2016-12-04
| | | | | | | | | | | | | | | | | | | | | - tld_names.dat.gz - rename to public_suffix_list.dat.gz - (re)created during build - new location /usr/share - move services files to /etc/ddns - new services - CloudFlare.com-v4 using API-Version 4 without using public_suffix_list.dat - GoDaddy.com - both depending on cURL package - both with modified syntax for option domain ( NEW: [host[.subdom]@]domain.tld ) - new service - Now-DNS.com formerly Now-IP.com - service afraid.org now supports key-auth and basic-auth - new command line options for dynamic_dns_updater.sh and dynamic_dns_updater.sh - adapted ddns.init and ddns.hotplug to new command line options - renaming config options inside section global Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: fix reporting wrong versionChristian Schoenebeck2016-09-28
| | | | Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: no longer break using nslookup and option force_ipversion=1Christian Schoenebeck2016-09-26
| | | | Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: Update to 2.7.4Christian Schoenebeck2016-09-04
| | | | | | | | | | | | - 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 <christian.schoenebeck@gmail.com>
* ddns-scripts: fix parameter handling "is_glue" and "dns_server" (lucihelper)Christian Schoenebeck2016-06-18
| | | | | | | - fix handling of parameter "is_glue" and "dns_server" to work with luci-app-ddns - update TLD_names.dat Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: initialise the is_glue variableMathias Kresin2016-06-12
| | | | | | Improve the code as suggested by Christian Schoenebeck. Signed-off-by: Mathias Kresin <dev@kresin.me>
* ddns-scripts: add support for glue recordsMathias Kresin2016-06-01
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Assuming the following dns zone configuration for kresin.me: . 1800 IN NS ns.inwx.de. home.kresin.me. 1800 IN NS gw.home.kresin.me. gw.home.kresin.me. 60 IN A 198.51.100.1 Using the example, gw.home.kresin.me is a glue record and used as DDNS record as well. gw.home.kresin.me points to the OpenWrt installation where the ddns-scripts are running. Since ns.inwx.de isn't the authoritative server for home.kresin.me, a query for the the A record of gw.home.kresin.me will be "forwarded" to and replied by the authoritative server 198.51.100.1. If the authoritative server can't be reached, the query times out without any address returned. The only way to get the A record of the glue record is to use bind host in verbose output mode, query ns.inwx.de for gw.home.kresin.me and evaluate the additional section of the response. To my knowledge, only bind host in verbose output mode shows the additional section of the response. Therefore, this features depends on bind host. It is not possible to use the bind host verbose mode for all queries. In verbose mode the "has address" line isn't returned. Grepping for the hostname might fail if the hostname is CNAME. Grepping for the first occurrence of an ip-address is way to error prone, since it could return the ip address of a different record type. Signed-off-by: Mathias Kresin <dev@kresin.me>
* dns-scripts: add DNS lookup support for "drill" and "khost" (Knot DNS)Christian Schoenebeck2016-05-08
| | | | | | | | | - 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 <christian.schoenebeck@gmail.com>
* ddns-scripts: fix comparing IPv6 addressesChristian Schoenebeck2016-03-07
| | | | | | fix comparing IPv6 addresses Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: correct freedns.afraid.org update url and new providerChristian Schoenebeck2016-03-05
| | | | | | | | | | - roll back to "old" update_url of freedns.afraid.org fix for #2445 and openwrt/luci#661 - add provider nubem.com (IPv4 only) - add provider nettica.com (IPv4 only) - add provider zerigo.com (IPv4 and IPv6) - add provider regfish.de (IPv4 and IPv6) Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: uclient-fetch supports -4/-6Stijn Tintel2016-02-29
| | | | Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
* ddns-scripts: update to 2.6.1-1 with several fixesChristian Schoenebeck2016-02-06
| | | | | | | | | - new function expand_ipv6() - expand IPv6 before compare https://dev.openwrt.org/ticket/21725 - Fix split_FQDN() to return host.subdomain correctly #2334 - modified check for musl library used by nslookup #2341 #2346 thanks to Arjen de Korte Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: Ver.2.6.0 - support hostip and uclient-fetchChristian Schoenebeck2016-01-24
| | | | | | | | | | | | | - add support for "hostip" to get_registered_ip() as alternative to "Bind host" package https://dev.openwrt.org/ticket/20893#comment:5 - allow to send updates using compiled-in certificate file/path of curl/wget #2242 #2243 #2245 - add support for uclient-fetch / libustream-ssl.so - remove /128 prefix-filter in get_local_ip() via interface #2268 - add dyndns.org to services_ipv6 https://forum.openwrt.org/viewtopic.php?id=62103 - readd duckdns.org to services #2251 (lost somewhere in data heaven) - add zzzz.io service #2302 - updated tld_names.dat Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: rollup to version 2.5.0-1Christian Schoenebeck2015-11-04
| | | | | | | | | | | | | | - add -V / --version parameter to show version information - new option lookup_host as host to use by nslookup/host to validate IP address changes, to be separate from [DOMAIN] parameter which produces a lot of questions in the forum and on multi-host updates - new option param_enc for optional usage inside update_url [PARAMENC] (will be send urlencoded) - new option param_opt for optional usage inside update_url [PARAMOPT] - new service strato.de (IPv4 only) requested by ludwig.jaffe@ - new service variomedia.de (IPv4 & IPv6) requested by Wolfgang Oertl #1884 - rewritten function get_service_data to read services/service_ipv6 file - allow 3rd parameter inside services/service_ipv6 file - here should be the answer of the ddns provider on success. If parameter is set, it's checked by ddns-scripts and report errors to logfile/syslog if failed and retry - updated tld_names.dat Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: fix/update to version 2.4.3-1Christian Schoenebeck2015-06-24
| | | | | | | | fixed sed when filtering IP address from nslookup output because "Server:" block might have multiple address lines. Thanks to Arjen de Korte Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: bugfixes/update to version 2.4.1-1Christian Schoenebeck2015-04-12
| | | | | | | | | * fix problem with lucihelper script reported in OpenWrt Ticket 19419 * rewritten split_FQDN fixing detection errors and using zcat * updated tld_names.dat and .gz compressed to save space * add LoopiaDNS (loopia.se) to services_ipv6 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: update to version 2.3.0-1Christian Schoenebeck2015-02-10
| | | | | | | | new option "use_curl" to force the use of curl if GNU Wget and curl are installed fix initscript reload(): reload and not restart if killall -1 fails BusyBox nc not support -v in every compiled version Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
* ddns-scripts: Update to version 2.2.0-1Christian Schoenebeck2015-02-05
modified source directory structure - files for production files - samples for sample files (not installed in final build) modified Makefile - separate options for additional provider scripts - remove comments and empty lines from final build add IPv4 100.64/10 (RFC 6598) and 169.254/16 (RFC 5735) to the range of default blocked IP's. new option "bind_network" to force GNU Wget or cURL to use specific network/interface for communication new "domains.google.com" as IPv4 DDNS provider #822 Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>