Compare commits

...

2 commits

Author SHA1 Message Date
Christian Hesse
3aaba1f408 netwatch-dns: check with eworm.de and eworm.net
This should prevent against DENIC outages...

https://blog.denic.de/en/denic-reports-resolved-dnssec-disruption-affecting-de-domains/
2026-05-06 16:15:17 +02:00
Christian Hesse
0ef11bf11d global-functions: $IsDNSResolving: check with :retry 2026-05-06 16:15:17 +02:00
2 changed files with 14 additions and 12 deletions

View file

@ -812,16 +812,16 @@
# check if DNS is resolving # check if DNS is resolving
:set IsDNSResolving do={ :set IsDNSResolving do={
:do { :do {
:resolve "low-ttl.eworm.de"; :local I 1;
:return true; :retry {
} on-error={ } :set I ($I ^ 1);
:resolve ("low-ttl.eworm." . ({ "de"; "net" }->$I));
:do { } delay=50ms max=6;
:resolve "low-ttl.eworm.net"; } on-error={
:return true;
} on-error={ }
:return false; :return false;
}
:return true;
} }
# check if system is is fully connected (default route reachable, DNS resolving, time sync) # check if system is is fully connected (default route reachable, DNS resolving, time sync)

View file

@ -115,13 +115,15 @@
:local Data false; :local Data false;
:onerror Err { :onerror Err {
:local I 1;
:retry { :retry {
:set I ($I ^ 1);
:set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \ :set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \
http-header-field=({ "accept: application/dns-message" }) \ http-header-field=({ "accept: application/dns-message" }) \
url=(($DohServer->"doh-url") . "?dns=" . [ :convert to=base64 ([ :rndstr length=2 ] . \ url=(($DohServer->"doh-url") . "?dns=" . [ :convert to=base64 ([ :rndstr length=2 ] . \
"\01\00" . "\00\01" . "\00\00" . "\00\00" . "\00\00" . "\09doh-check\05eworm\02de\00" . \ "\01\00" . "\00\01" . "\00\00" . "\00\00" . "\00\00" . "\09doh-check\05eworm" . \
"\00\10" . "\00\01") ]) as-value ]->"data"); ({ "\02de"; "\03net" }->$I) . "\00" . "\00\10" . "\00\01") ]) as-value ]->"data");
} delay=1s max=3; } delay=500ms max=6;
} do={ } do={
$LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \ $LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \
" failed: " . $Err); " failed: " . $Err);