Compare commits

..

72 commits

Author SHA1 Message Date
Christian Hesse
8109b4fca5 netwatch-dns: check with a HTTP/2 request
We need RouterOS 7.24 for this to catch runtime errors for bad
command parameters.

Actually this would work with RouterOS 7.23 on architectures that
support http-version=http2 ...
2026-07-15 21:33:18 +02:00
Christian Hesse
8c6707befd Merge branch 'dhcp-to-dns' into next 2026-07-15 21:33:18 +02:00
Christian Hesse
6dbd228c7f bump required RouterOS version for all scripts 2026-07-15 21:33:18 +02:00
Christian Hesse
04f0d6a397 dhcp-to-dns: allow to ignore for specific lease 2026-07-15 21:33:18 +02:00
Christian Hesse
5221d79ff1 global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-07-15 21:33:18 +02:00
Christian Hesse
07771109fe update list of contributors 2026-07-15 21:33:18 +02:00
Christian Hesse
76c2c97c6c Merge branch 'break-in-loop' into next 2026-07-15 21:33:18 +02:00
Łukasz Witkowski
65c24c0137 dhcp-to-dns: allow to specify domain for CNAMEs...
... in network or lease.
2026-07-15 21:33:18 +02:00
Christian Hesse
b2e7ec1b5c Merge branch 'continue-in-loop' into next 2026-07-15 21:33:18 +02:00
Christian Hesse
0d6a2a9381 telegram-chat: fix indention 2026-07-15 21:33:18 +02:00
Łukasz Witkowski
14ad52b269 dhcp-to-dns: set $LeaseInfo 2026-07-15 21:33:18 +02:00
Christian Hesse
e2adfb362c Merge branch 'early-exit-with-exit' into next 2026-07-15 21:33:18 +02:00
Christian Hesse
6b8324a51a dhcp-to-dns: fix indention 2026-07-15 21:33:18 +02:00
Christian Hesse
97a1088823 telegram-chat: use :break in loop 2026-07-15 21:33:18 +02:00
Łukasz Witkowski
4fe3ba1d1f dhcp-to-dns: convert DNS names to lower case 2026-07-15 21:33:18 +02:00
Christian Hesse
9c1e2d3897 Merge branch 'compare-ids' into next 2026-07-15 21:33:18 +02:00
Christian Hesse
b7e12faf6e global-functions: deprecate $ExitError 2026-07-15 21:33:18 +02:00
Christian Hesse
d7951e52b9 dhcp-to-dns: use another :continue in loop 2026-07-15 21:33:18 +02:00
Christian Hesse
a7f88ad976 check-certificates: use :break in loop 2026-07-15 21:33:18 +02:00
Christian Hesse
1162f01ecc dhcp-to-dns: support to ignore networks
Closes: https://github.com/eworm-de/routeros-scripts/issues/119
2026-07-15 21:33:18 +02:00
Christian Hesse
0763344ba1 CERTIFICATES: correct the details on certificates 2026-07-15 21:33:18 +02:00
Christian Hesse
876b58804c global-functions: deprecate $HexToNum 2026-07-15 21:33:18 +02:00
Christian Hesse
c6137ef347 update-tunnelbroker: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
ee34a67fcb dhcp-to-dns: use :continue in loop 2026-07-15 21:33:18 +02:00
Christian Hesse
c8c9165e9c log-forward: fix indention 2026-07-15 21:33:18 +02:00
Christian Hesse
849755a604 update-gre-address: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
f57030a2cd telegram-chat: use :continue in loop 2026-07-15 21:33:18 +02:00
Christian Hesse
6b30813630 log-forward: use comparison for ids
This was introduced with RouterOS 7.22beta1.

Initializing $LogForwardLast with boolean value looks odd, but this is
required to match the very first message.
2026-07-15 21:33:18 +02:00
Christian Hesse
bf4e520eb2 telegram-chat: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
3405b5c2f5 netwatch-dns: fix indention 2026-07-15 21:33:18 +02:00
Christian Hesse
bea67c57b0 sms-forward: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
3a307c4ddd netwatch-dns: use :continue in loop 2026-07-15 21:33:18 +02:00
Christian Hesse
61d871efad sms-action: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
214f2114a2 netwatch-dns: fix indention 2026-07-15 21:33:18 +02:00
Christian Hesse
65a873c137 ppp-on-up: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
00c07aa260 netwatch-dns: use :continue in loop 2026-07-15 21:33:18 +02:00
Christian Hesse
f5045612e0 packages-update: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
70f90a55b9 global-functions: $ScriptInstallUpdate: fix indention 2026-07-15 21:33:18 +02:00
Christian Hesse
9e6eb5eccf ospf-to-leds: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
880df18e07 global-functions: $ScriptInstallUpdate: use :continue in loop 2026-07-15 21:33:18 +02:00
Christian Hesse
60d7ca7b19 netwatch-notify: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
39dfc053ac global-functions: $CleanName: use :continue in loop 2026-07-15 21:33:18 +02:00
Christian Hesse
a267bb05bd netwatch-dns: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
eeca8d7f1b fw-addr-lists: fix indention 2026-07-15 21:33:18 +02:00
Christian Hesse
f04b4fc2f3 log-forward: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
82ca8e1bc1 fw-addr-lists: use :continue in loop 2026-07-15 21:33:18 +02:00
Christian Hesse
edd2aa3ff3 ipv6-update: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
efa4ea77db ipsec-to-dns: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
69accb0adb hotspot-to-wpa-cleanup: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
4302acad23 hotspot-to-wpa: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
81a7eeb624 gps-track: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
031838d27f fw-addr-lists: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
3374d52561 firmware-upgrade-reboot: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
b59606fd0e dhcpv6-client-lease: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
505d417c01 dhcpv4-server-lease: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
53d35bca72 dhcp-to-dns: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
cd80532802 dhcp-lease-comment: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
ec119ab535 daily-psk: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
29ccb1a9e4 collect-wireless-mac: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
9a355bed08 check-routeros-update: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
09ba73e8b7 check-perpetual-license: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
81d8dd00a4 check-lte-firmware-upgrade: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
583ce8ea3c check-health: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
b2b4fafced check-certificates: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
8c4ec2feb7 certificate-renew-issued: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
afacfeaa9d capsman-rolling-upgrade: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
6cfb3032f2 capsman-download-packages: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
95fdf20e21 backup-upload: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
afbf6594c4 backup-partition: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
f94e2e8fbc backup-email: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
7a17c7c022 backup-cloud: early exit with :exit 2026-07-15 21:33:18 +02:00
Christian Hesse
dc440f2f13 global-functions: $CertificateAvailable: undefined intended use is info...
... not warning.
2026-07-15 16:27:51 +02:00
4 changed files with 15 additions and 8 deletions

View file

@ -48,7 +48,9 @@ can be closed now.)
![screenshot: window](CERTIFICATES.d/03-window.avif)
A new tab opens, showing information on the server certificate and its
chain of trust. The leftmost certificate is what we are interested in.
chain of trust. The leftmost certificate is the current server certificate,
the rightmost one is the *certification authority* certificate and what we
are interested in.
![screenshot: certificate](CERTIFICATES.d/04-certificate.avif)

View file

@ -4,7 +4,7 @@ Manage DNS and DoH servers from netwatch
[![GitHub stars](https://img.shields.io/github/stars/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=red)](https://github.com/eworm-de/routeros-scripts/stargazers)
[![GitHub forks](https://img.shields.io/github/forks/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=green)](https://github.com/eworm-de/routeros-scripts/network)
[![GitHub watchers](https://img.shields.io/github/watchers/eworm-de/routeros-scripts?logo=GitHub&style=flat&color=blue)](https://github.com/eworm-de/routeros-scripts/watchers)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.22-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.24rc1-yellow?style=flat)](https://mikrotik.com/download/changelogs/)
[![Telegram group @routeros_scripts](https://img.shields.io/badge/Telegram-%40routeros__scripts-%2326A5E4?logo=telegram&style=flat)](https://t.me/routeros_scripts)
[![donate with PayPal](https://img.shields.io/badge/Like_it%3F-Donate!-orange?logo=githubsponsors&logoColor=orange&style=flat)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)

View file

@ -112,7 +112,7 @@
:global ParseKeyValueStore;
:if ([ :len $UseFor ] = 0) do={
$LogPrint warning $0 ("The intended use is undefined!");
$LogPrint info $0 ("The intended use is undefined!");
:set UseFor "undefined";
}

View file

@ -3,7 +3,7 @@
# Copyright (c) 2022-2026 Christian Hesse <mail@eworm.de>
# https://rsc.eworm.de/COPYING.md
#
# requires RouterOS, version=7.22
# requires RouterOS, version=7.24rc1
# requires device-mode, fetch
#
# monitor and manage dns/doh with netwatch
@ -113,11 +113,16 @@
:local I 1;
:retry {
:set I ($I ^ 1);
:set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \
http-header-field=({ "accept: application/dns-message" }) \
url=(($DohServer->"doh-url") . "?dns=" . [ :convert to=base64 ([ :rndstr length=2 ] . \
:local 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"; "\03net" }->$I) . "\00" . "\00\10" . "\00\01") ]) as-value ]->"data");
({ "\02de"; "\03net" }->$I) . "\00" . "\00\10" . "\00\01") ]);
:do {
:set Data ([ /tool/fetch check-certificate=yes-without-crl output=user http-version=http2 \
http-header-field=({ "accept: application/dns-message" }) url=$Url as-value ]->"data");
} on-error={
:set Data ([ /tool/fetch check-certificate=yes-without-crl output=user \
http-header-field=({ "accept: application/dns-message" }) url=$Url as-value ]->"data");
}
} delay=500ms max=6;
} do={
$LogPrint warning $ScriptName ("Request to DoH server " . ($DohServer->"doh-url") . \