According to [1] Basic Auth seems to be broken since a while for he.net.
The documentation [2] is outdated, and still mentions Basic Auth, but
switching to parameter-based authentication seems to fix the issue.
It also bumps PKG_RELEASE in order to ensure a new version is packaged.
[1]: https://github.com/openwrt/packages/issues/27593
[2]: https://dns.he.net/docs.html
Signed-off-by: Karol Babioch <karol@babioch.de>
OVH changed its API to update DNS records. It now requires HTTP Basic
Authorization header. As such the default ddns-script method to update
the DNS record is failing. The fix is to move DNS record updates into
its own script/package.
Signed-off-by: David Andreoletti <david@andreoletti.net>
Calculating the next check time based on the last update time is not
very accurate if the next check is a large multiple forwards from the
last update time because the cumulative sleeps and wake times are not
exact but best effort of the OS. Other factors including clock-drift
give rise to a larger time discrepancy the further the next update is in
the future.
Stash the next check time which should be quite accurate since it's
only one sleep instance away. This is also for use in the GUI.
Tested on 24.10.2
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Add back the regex searching for valid IP address when getting IP
address via web.
Fixes: 9cdd1a1660 ("ddns-scripts: refactor get_current_ip()")
Signed-off-by: Qian Suyao <qiansuyao@gmail.com>
User can (optionally) set zone_id and dns_record_id in param_opt.
This allows round robin DNS setup in Cloudflare.
Signed-off-by: Eric Leung <contact@ericleung.dev>
Remove the awk based ifconfig output handling violence (omg) and instead
use the ip utility and its JSON output: this uses the available
system utility jsonfilter. Much cleaner and less brittle.
This fixes alias interface handling
Fixes issue #24922
Add dep 'ip' (iproute2: ip-tiny, ip-full)
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Leverage the resolveip utility - it does the same job that several
different resolvers do for a fraction of the resource usage. This...
to verify a host's connectivity.
resolveip dependency net delta: +2-3Kbytes
Also uses the ddns-scripts built-in 'timeout' function.
Signed-off-by: Paul Donald <newtwen+github@gmail.com>
Compatible with domain without the `@` symbol, consistent with the previous.
Fixes 8c55d089 ("ddns-scripts: fix parsing of parameters for cloudflare.com")
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
There is an obvious bug here:
if we want to update example.com.example.com in zone example.com,
so `domain=example.com@example.com`, after parsing,
the `__HOST` will be `example.com`, not expected `example.com.example.com`.
Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
The 'ps' command from 'procps-ng' is used in favour of 'ps' from 'busybox'
when 'procps-ng' is installed. The problem is that the outputs are not
compatible and the ‘grep’ is different for further processing. To fix this,
always use the 'ps' command from 'busybox'.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
ddns-scripts-scaleway description section was not defined as such and was
overriding the package definition leading to:
Makefile:839: *** missing separator. Stop.
Fixes: a7867016c8 ("ddns-scripts: add support for Scaleway DNS")
Signed-off-by: Robert Marko <robimarko@gmail.com>
Script will exit when an error occurred.
Modify write_log 14 to write_log 4,
write_log 14 and write_log 4 can also print the same message,
but write_log 14 will exist script when printed.
Signed-off-by: Lehua Zhang <sxlehua@qq.com>
DigitalOcean API requires a "type" JSON field to update a DNS
record. This adds that while checking for IPv6 to change which
record type to use. Without it, the API call fails, making
the script unable to update the DNS records for DigitalOcean.
Signed-off-by: Adam Beck <subcursion@gmail.com>
If pppoe is used for wan access. script set 'eth1' as interface for curl
call. The correct interface is however 'pppoe-wan'.
These scripts use 'network_get_physdev' function to get real device for
bind_network but this is wrong. We need instead the l3_device of the the
logical interface.
In case if we don't use pppoe connection - 'l3_device' is equal to real device.
Follow P/R:
#14431
Signed-off-by: Coia Prant <coiaprant@gmail.com>
Using the PUT method recreates the DNS record with and only with
the newly provided data. This seems unnecessary. In particular,
we don't need to hardcode a TTL of 120. Any existing comment
would be lost too.
The only detail we need to change is the IP address. Leave everything
else as it was.
Signed-off-by: Gedalya Nie <gedalya@gedalya.net>
Having both double quotes and parentheses in package
description may lead into troublewith apk, if parentheses
are located so that they get passed "outside" the quoted
parameter, and get interpreted as a token for shell.
Example:
ash: -c: line 1: syntax error near unexpected token `('
bash: -c: line 1: `/OpenWrt/e8450/staging_dir/host/bin/fakeroot
/OpenWrt/e8450/staging_dir/host/bin/apk mkpkg --info "name:ddns
-scripts-pdns" --info "version:2.8.2-r51" --info "description:D
ynamic DNS Client scripts extension for "PowerDNS" via API. It
requires: "option param_opt(Optional Parameter)" to be a valid
Avoid that by using single quotes in the detailed descriptions.
Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
If the "name" parameter is not provided, then updates to a subdomain
A/AAAA record result in the subdomain being removed from the record.
This change always provides the "name" parameter to correct that behavior.
Signed-off-by: Dillon Dixon <github@dillon.io>
Extends DDNS support for the Porkbun v3 JSON API with a custom update
script and service configuration.
See: https://porkbun.com/api/json/v3/documentation
Depends on cURL (with SSL) for transport. Porkbun authentication API keys
and secret keys are passed through the ddns-scripts "username" and
"password" variables, respectively. As Porkbun DNS is currently backed by
Cloudflare, also support ddns-scripts "rec_id" variable for specific
record targeting.
Signed-off-by: Ansel Horn <dev@cahorn.net>
ovh.com supports https and IPv6 since March 2024.
New API operates under domain dns.eu.ovhapis.com
Add IPv6 support, use https and updated domain for ovh.com.
Signed-off-by: Karol Kolacinski <kolacinskikarol@live.com>
The output format of `khost` has changed. This commit fixes the regexp
for IPv4. It fixes the issue of using a custom DNS to resolve current
address.
```bash
root@localhost:~# khost ns2.afraid.org
ns2.afraid.org. has IPv4 address 69.65.50.223
ns2.afraid.org. has IPv6 address 2001:1850:1:5:800::6b
Host ns2.afraid.org. has no MX record
root@localhost:~# khost --version
khost (Knot DNS), version 3.3.5
```
Signed-off-by: Denis Shulyaka <Shulyaka@gmail.com>
When the ddns update script is started, the system checks whether the
configured DNS server can be reached. This is checked with the 'netcat' tool.
The tool tries to establish a TCP connection on port 53 of the configured
DNS server.
The problem with this implementation is, that this call blocks the ddns
update script until 'netcat' returns from the call.
Verfification failed:
If the IP and the port cannot be reached, the netcat call returns
immediately.
Verfification successfull:
If the IP and the port of the DNS server can be reached, the connection
remains established and so the ddns update scripts blocks until the
configured TCP session timeout of the DNS server resets the connection.
The behavior in the event of an successfull verificataion is a problem
for the ddns update script if it is called via the hotplug. Since the ddns
update script runs too long! This blocking behavior also depends on
the TCP session timeout setting of the DNS server.
> time netcat 1.1.1.1 53
netcat 1.1.1.1 53 0.00s user 0.00s system 0% cpu 10.016 total
> time netcat 8.8.8.8 53
netcat 8.8.8.8 53 0.00s user 0.00s system 0% cpu 2.012 total
The TCP session timeout is for 1.1.1.1 10 seconds and for 8.8.8.8 2 seconds.
The '--wait' option of necat or the additional integration of the 'timeout'
function of busybox was implemented for this behavior. But the used '--wait'
function of netcat of the busybox shows no effect here.
Since the used implementation is not clean, the question arise why this
is necessary for the ddns update script at all? As the nslookup throws an
error anyway if it cannot resolve the IP. This check is only informative.
The check does not affect the script behavior.
The check is therefore removed on ddns update.
Signed-off-by: Florian Eckert <fe@dev.tdt.de>
When a "service ddns reload" is issued, the ddns processes are being
duplicated.
It seems the culprit is the -1 in the 'killall' command, and removing it
fixes the issue.
The -1 means to use SIGHUP, instead of the default SIGTERM.
In this case, the idea is to kill all other processes, so SIGTERM is
appropriate. In case the processes hang, SIGKILL may be another option.
Signed-off-by: Miguel Angel Mulero Martinez <migmul@gmail.com>
The samples in the repo are useful for configuring cenrtain aspects of
ddns, and their inclusion is hinted at within their source code
Signed-off-by: Julian Grinblat <julian@dotcore.co.il>