Commit Graph

106 Commits

Author SHA1 Message Date
Christian Schoenebeck 6d8f45f759 ddns-scripts: fixes "sed: no previous regexp"
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>
2018-04-21 12:11:46 +02:00
Danny Scott d5ae2850b8
ddns-scripts: Add OK to valid easydns resonse.
Signed-off-by: Danny Scott <doscott@gmail.com>'
2018-04-16 09:46:17 -03:00
Christian Schoenebeck 74eac1f595 ddns-scripts: fix incompatibility with luci-app-ddns <= V.2.4.8-2
fix incompatibility with luci-app-ddns versions <= 2.4.8-2 (#5430)

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2018-01-14 20:27:59 +01:00
Christian Schoenebeck 8cb6b1dc4d ddns-scripts: multiple fixes
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>
2018-01-13 11:58:17 +01:00
Max Berger 0eda1007bb ddns-scripts: Support Amazon AWS Route53 as a ddns provider
Based on a sh-only route53 update script by Yuval Adam
https://github.com/yuvadm/route53-ddns/blob/master/route53.sh

Signed-off-by: Max Berger <max@berger.name>
2018-01-09 22:08:51 +01:00
Alexander Couzens 2b3b72522d
ddns-scripts: remove gzip timestamp
gzip create a header by default containing the filename
and the timestamp of the file.
This timestamp will break reproducible builds [0].

[0] https://reproducible-builds.org/docs/timestamps/

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-12-03 06:24:21 +01:00
Wendy Wu 8e62bc6b6c ddns-script: fix update_url incorrect for duckdns.org service
Maintainer: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Compile tested: arch:arm, OpenWRT/LEDE version:for-15.05
Run tested: arch:arm, OpenWRT/LEDE version:for-15.05, tests done

Description:
<ddns-script>: fix update_url incorrect for duckdns.org service
Signed-off-by: Wendy Wu <wendy2001011@163.com>
2017-10-30 14:07:16 +08:00
Ernest Moshkov 6943f44550 ddns-scripts: fix dynv6.com "unchanged" response
Maintainer: Christian Schoenebeck <christian.schoenebeck@gmail.com>
Run tested: LEDE Reboot 17.01.3 r3533-d0bf257c46

Description:

user.err ddns-scripts: IP update not accepted by DDNS Provider

dynv6.com response "unchanged" is OK

Signed-off-by: Ernest Moshkov <e.moshkov@gmail.com>
2017-10-22 17:08:38 +03:00
Qian Zheng f626cd6334 net/ddns-scripts: Fix deSEC update URL
deSEC update API doesn't support http://[USERNAME]:[PASSWORD]@update.dedyn.io/update authorization.

So we need to pass username & password as get parameters.

API ref: https://desec.io/#!/en/docs/update-api-details

Signed-off-by: Qian Zheng <sotux82@gmail.com>
2017-09-25 08:56:46 +08:00
Phil John 9d7f3d5f63 ddns-scripts: update PKG_RELEASE in Makefile
As requested, bumping the PKG_RELEASE

Signed-off-by: Phil John <philjohn@gmail.com>
2017-08-16 20:55:22 +01:00
Phil John b55730e7eb ddns-scripts: add support for dynu.com IPv6 update
Dynu.com already support IPV6 updates using the parameter myipv6, adding to services_ipv6 to enable support in OpenWRT/LEDE

Signed-off-by: Phil John <philjohn@gmail.com>
2017-08-14 21:29:18 +01:00
Thomas Guyot-Sionnest 251e5c9cb1 ddns-scripts: Add afraid.org version 2 API
afraid.org has a new update API with better IPV6 support. It needs to be
specifically enabled for each domain, so the original v1 api has been

Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
2017-07-15 16:36:44 -04:00
Alvaro [Andor] f721a27b15 Fix http/https, increase PKG_RELEASE 2017-06-27 23:48:53 +02:00
Alvaro [Andor] c55885e9c5 Fix dnsmadeeasy ddns url
Dnsmadeeasy dyndns service url was wrong, fixed both the address, the parameters, and the ssl connection.
2017-06-15 22:05:50 +02:00
Xavier Douville 2a2ea67586 ddns-scripts: remove answer checking for dnsexit
remove answer checking for dnsexit as their API allows for too many return codes to handle them all.

Signed-off-by: Xavier Douville <zorxd@users.noreply.github.com>
2017-03-13 12:15:27 -04:00
Xavier Douville 0eab032f99 ddns-scripts: increment PKG_RELEASE
Signed-off-by: Xavier Douville <zorxd@users.noreply.github.com>
2017-03-12 13:02:04 -04:00
Xavier Douville 96e526bad3 ddns-scripts: update dnsexit.com update URL+response. Reference http://downloads.dnsexit.com/ipUpdateDev.doc
Signed-off-by: Xavier Douville <zorxd@users.noreply.github.com>
2017-03-12 11:00:25 -04:00
Stijn Tintel f82287cf5c treewide: use name in define and eval lines
For consistency, use full name instead of $(PKG_NAME) in define and eval
lines for all packages.

I've seen reviews that asked to do this before, and I am asking the same
during reviews now. To avoid this in the future, fix this treewide so
when people use existing packages as example, we will not have to
request this change anymore.

This makes all packages consistent with both LEDE and OpenWrt base
repositories.

Signed-off-by: Stijn Tintel <stijn@linux-ipv6.be>
2017-03-08 21:15:20 +01:00
Christian Schoenebeck 1ed6afb980 ddns-scripts: New update url for service duiadns.net
- new update url for service "duiadns.net"
- updated public_suffix_list.dat

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2017-02-09 21:41:40 +01:00
Christian Schoenebeck 04d808ec43 ddns-scripts: 2nd fix detecting local ip from ip command
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2017-01-16 21:08:33 +01:00
Christian Schoenebeck d093904bc1 ddns-scripts: fix detecting local ip from ip command
fix detecting local ip from ip command #3834

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2017-01-15 10:30:38 +01:00
Christian Schoenebeck 71b50a7acc ddns-scripts: fixes for nslookup and khost
- 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>
2017-01-11 22:08:42 +01:00
Christian Schoenebeck 2c7d476cd9 ddns-scripts: make cloudflare v1 same "domain" parameter syntax
- 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>
2017-01-09 21:30:55 +01:00
Christian Schoenebeck 10e0400a23 ddns-scripts: no longer build public_suffix_list.dat.gz during build
- no longer build public_suffix_list.dat.gz during build #3678
- replace "\s" with "[[:space:]]" inside Makefile because "\s" ignored by some sed versions
- tools/public_suffix_list.sh still available to rebuild public_suffix_list.dat.gz outside OpenWRT/LEDE build system

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-12-25 16:02:52 +01:00
Christian Schoenebeck 3065760a84 ddns-scripts: get public_suffix_list.dat without using secure connection
Get public_suffix_list.dat without using secure connection. #3678

File generated during build, because it's the only option to have an
actual version packaged.
Long term Cloudflare_v1 package will be changed to no longer need
public_suffix_list.dat

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-12-24 15:52:19 +01:00
Christian Schoenebeck 97acd6eb2d ddns-scripts: fix return codes if provider's data already up to date
Fix return codes, if ip data at Godaddy.com and Cloudflare.com are
already up to date, handle it as succesful update.

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-12-20 20:09:50 +01:00
Christian Schoenebeck b6377ba8db ddns-scripts: fixes for cloudflare v4
- 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>
2016-12-18 20:35:39 +01:00
Christian Schoenebeck 13d1169d5e ddns-scripts: set default verbose=0 so scripts run in background
fix #3645 and https://github.com/lede-project/source/pull/596#issuecomment-266395456

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-12-12 21:07:20 +01:00
Christian Schoenebeck 099acdb89e ddns-scripts: fix answer of changeip.com
fix answer of changeip.com #3292

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-12-11 10:47:51 +01:00
Christian Schoenebeck c380d595a8 ddns-scripts: extended/updated Makefile
modified Makefile to:
- stop service before install when updating reported at http://forum.lede-project.org/t/ddns-scripts-upgrade-issue/456/1
- run uci-defaults for all packages
- modify services files only on new installation
still some commands already covered by default_postinst() etc. but they are in there for backward compatibilty.

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-12-09 20:14:06 +01:00
Christian Schoenebeck 4ae1484a19 ddns-scripts: various fixes
fixes reported in #3621 #3617 #3616

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-12-05 20:40:09 +01:00
Christian Schoenebeck 1c20dcb71a ddns-scripts: update to 2.7.6-1
- 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>
2016-12-04 16:47:09 +01:00
Christian Schoenebeck f3395bb891 ddns-scripts: fix answer of changeip.com
* fix answer of changeip.com (#3292)

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-10-04 11:22:05 +02:00
Christian Schoenebeck fbc27e89f3 ddns-scripts: fix reporting wrong version
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-09-28 18:48:44 +02:00
Christian Schoenebeck f5e3d3f743 ddns-scripts: remove postinst (of main package) from Makefile
remove postinst (of main package) from Makefile because all is done inside uci-defaults scripts

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-09-27 10:12:24 +02:00
Christian Schoenebeck 463ed88dde ddns-scripts: apply needed changes in uci-defaults
commands to apply changes introduced during release changes, moved from Makefile postinst to /etc/uci-defaults

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-09-26 21:33:01 +02:00
Christian Schoenebeck f0b96d9109 ddns-scripts: no longer break using nslookup and option force_ipversion=1
Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-09-26 21:24:35 +02:00
Christian Schoenebeck 7805abc6c4 ddns-scripts: Add more services and minor changes
- add support of knsupdate (update_nsupdate.sh
- url update easydns.com
- add some service answers
- alphabetic reorder services files for easier reading
- rename services/provider (Makefile postinst handle /etc/config/ddns)
 -- freedns.afraid.org -> afraid.org
 -- free.editdns.net -> editdns.net
 -- domains.google.com -> google.com
 -- spdns.de -> spdyn.de
 -- strato.de -> strato.com
- new provider (looking in deep into https://sourceforge.net/projects/inadyn-mt project)
 -- dyn.com (= dyndns.org)
 -- ddnss.de
 -- dhis.org
 -- dnspark.com (IPv4 only)
 -- dynsip.org (IPv4 only)
 -- dynv6.com
 -- joker.com (IPv4 only)
 -- loopia.com (= loopia.se)
 -- sitelutions.com (IPv4 only)
 -- system-ns.com (IPv4 only)
- new provider (looking in deep into /etc.defaults/ddns_provider.conf file for Synology DiskStation published at https://gist.github.com/ntrepid8/6653274)
 -- able.or.kr (IPv4 only)
 -- ddo.jp (IPv4 only)
 -- dnsmadeeasy.com (IPv4 only)
 -- oray.com (IPv4 only)
- new provider (looking in deep into https://github.com/ipfire/ddns project)
 -- all-inkl.com
 -- desec.io
 -- domopoli.de (IPv4 only)
 -- opendns.com (IPv4 only)
 -- udmedia.de
 -- xlhost.de (IPv4 only)
- new provider (looking in deep into https://github.com/yaddns/yaddns project )
 -- dyndns.it (IPv4 only)

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-09-26 21:24:35 +02:00
Tobias Schramm 47b0926772 Add good and nochg answer
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
2016-09-16 23:08:00 +02:00
Tobias Schramm aa1599b167 ddns-scripts: Add do.de as ddns provider
Signed-off-by: Tobias Schramm <tobleminer@gmail.com>
2016-09-14 19:39:25 +02:00
Christian Schoenebeck 3b8ef74df3 ddns-scripts: fixes to services files
- Provider duiadns.net: add IPv6 and correct IPv4 url inside services files #3125
- other fixes inside services files

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-09-04 20:46:06 +02:00
Christian Schoenebeck 01a42ec110 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 <christian.schoenebeck@gmail.com>
2016-09-04 13:30:09 +02:00
Michael Scholl 41d687d16a ddns-scripts: add service core-networks.de
- Added service core-networks.de
- Fixed typo for service dnshome.de

Signed-off-by: Michael Scholl <michael.scholl@core-networks.de>
2016-07-27 15:30:34 +02:00
Christian Schoenebeck 5d05e01d48 ddns-scripts: fix misuse of "local"
- fix misuse of "local" outside functions #2885
- update TLD_names.dat

Signed-off-by: Christian Schoenebeck <christian.schoenebeck@gmail.com>
2016-06-26 10:24:49 +02:00
Christian Schoenebeck d779a1f76f ddns-scripts: fix parameter handling "is_glue" and "dns_server" (lucihelper)
- 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>
2016-06-18 21:53:05 +02:00
Mathias Kresin ed11871c56 ddns-scripts: initialise the is_glue variable
Improve the code as suggested by Christian Schoenebeck.

Signed-off-by: Mathias Kresin <dev@kresin.me>
2016-06-12 12:42:44 +02:00
Mathias Kresin 1416770e3b ddns-scripts: add support for glue records
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>
2016-06-01 20:59:47 +02:00
Christian Schoenebeck 1bf23bd632 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 <christian.schoenebeck@gmail.com>
2016-05-08 13:14:45 +02:00
Anthony Brown e71f12632a ddns-scripts: update mythic-beasts ipv4 and add mythic-beasts ipv6
Signed-off-by: Anthony Brown <anthony@found-it.net>
2016-05-04 11:28:05 +01:00
Joel Johnson db68eda93e ddns-scripts: add IPv6 config for duckdns.org
Signed-off-by: Joel Johnson <mrjoel@lixil.net>
2016-05-01 23:00:11 -06:00