Compare commits

..

87 commits

Author SHA1 Message Date
Christian Hesse
99af1b6175 Merge branch 'dhcp-to-dns' into next 2026-05-13 16:55:25 +02:00
Christian Hesse
efa5bd2abe bump required RouterOS version for all scripts 2026-05-13 16:55:25 +02:00
Christian Hesse
017ccf44d8 dhcp-to-dns: allow to ignore for specific lease 2026-05-13 16:55:25 +02:00
Christian Hesse
adee675eb0 global-functions: $NetMask6: use shift operator...
... and drop the workaround. This requires RouterOS 7.22beta3.
2026-05-13 16:55:25 +02:00
Christian Hesse
f59a0d1bbb update list of contributors 2026-05-13 16:55:25 +02:00
Christian Hesse
2f83857b76 Merge branch 'break-in-loop' into next 2026-05-13 16:55:25 +02:00
Łukasz Witkowski
99945d1334 dhcp-to-dns: allow to specify domain for CNAMEs...
... in network or lease.
2026-05-13 16:55:25 +02:00
Christian Hesse
574b86f024 Merge branch 'continue-in-loop' into next 2026-05-13 16:55:25 +02:00
Christian Hesse
cb8b8b36d6 telegram-chat: fix indention 2026-05-13 16:55:25 +02:00
Łukasz Witkowski
e0f6546b2d dhcp-to-dns: set $LeaseInfo 2026-05-13 16:55:25 +02:00
Christian Hesse
51e7d6a593 Merge branch 'early-exit-with-exit' into next 2026-05-13 16:55:25 +02:00
Christian Hesse
7cb536c829 dhcp-to-dns: fix indention 2026-05-13 16:55:25 +02:00
Christian Hesse
74cc03474b telegram-chat: use :break in loop 2026-05-13 16:55:25 +02:00
Łukasz Witkowski
d54eabb085 dhcp-to-dns: convert DNS names to lower case 2026-05-13 16:55:25 +02:00
Christian Hesse
822559afbc Merge branch 'compare-ids' into next 2026-05-13 16:55:25 +02:00
Christian Hesse
305200ca1b global-functions: deprecate $ExitError 2026-05-13 16:55:25 +02:00
Christian Hesse
77cf23ab95 dhcp-to-dns: use another :continue in loop 2026-05-13 16:55:25 +02:00
Christian Hesse
d81c075b59 check-certificates: use :break in loop 2026-05-13 16:55:25 +02:00
Christian Hesse
a024aff5f1 dhcp-to-dns: support to ignore networks
Closes: https://github.com/eworm-de/routeros-scripts/issues/119
2026-05-13 16:55:25 +02:00
Christian Hesse
c58501b1fb global-functions: deprecate $HexToNum 2026-05-13 16:55:25 +02:00
Christian Hesse
7548b5e5a8 update-tunnelbroker: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
8a8dee53dc dhcp-to-dns: use :continue in loop 2026-05-13 16:55:25 +02:00
Christian Hesse
0d455c4a7b log-forward: fix indention 2026-05-13 16:55:25 +02:00
Christian Hesse
27a793bab5 update-gre-address: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
42abd26f0c telegram-chat: use :continue in loop 2026-05-13 16:55:25 +02:00
Christian Hesse
8053b21f1f telegram-chat: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
d4fbe5286a netwatch-dns: fix indention 2026-05-13 16:55:25 +02:00
Christian Hesse
3f97d9111d sms-forward: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
6e09ab8e94 netwatch-dns: use :continue in loop 2026-05-13 16:55:25 +02:00
Christian Hesse
a930ec53c4 sms-action: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
76ee34913e netwatch-dns: fix indention 2026-05-13 16:55:25 +02:00
Christian Hesse
6501c08fd6 ppp-on-up: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
24d635542c netwatch-dns: use :continue in loop 2026-05-13 16:55:25 +02:00
Christian Hesse
4b81df0081 packages-update: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
18097e10e6 global-functions: $ScriptInstallUpdate: fix indention 2026-05-13 16:55:25 +02:00
Christian Hesse
01aa94082e ospf-to-leds: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
ce8d3b4753 global-functions: $ScriptInstallUpdate: use :continue in loop 2026-05-13 16:55:25 +02:00
Christian Hesse
a632b15bff netwatch-notify: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
89e66670fe global-functions: $CleanName: use :continue in loop 2026-05-13 16:55:25 +02:00
Christian Hesse
5a546114c9 netwatch-dns: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
d7b0f66736 fw-addr-lists: fix indention 2026-05-13 16:55:25 +02:00
Christian Hesse
db90f8d306 log-forward: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
2a2975a491 fw-addr-lists: use :continue in loop 2026-05-13 16:55:25 +02:00
Christian Hesse
4cd0504548 ipv6-update: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
546aaa80d0 ipsec-to-dns: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
dcc39e6fb0 hotspot-to-wpa-cleanup: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
95cc6b2822 hotspot-to-wpa: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
869c75b53d gps-track: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
51e6c32f8c fw-addr-lists: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
6855ae2b6f firmware-upgrade-reboot: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
f54e501121 dhcpv6-client-lease: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
1ead0d484d dhcpv4-server-lease: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
4a5071fab5 dhcp-to-dns: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
77c336e99b dhcp-lease-comment: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
4fde1fa49a daily-psk: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
46c5aecb6b collect-wireless-mac: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
5db0eaed99 check-routeros-update: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
ef1e851197 check-perpetual-license: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
5ea97f97c9 check-lte-firmware-upgrade: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
c1aba692e5 check-health: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
5cf3a88714 check-certificates: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
59d1137943 certificate-renew-issued: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
5b57d5c58c capsman-rolling-upgrade: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
fbf83f9f7b capsman-download-packages: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
2761cadede backup-upload: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
19cf74c5bc backup-partition: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
87a026c442 backup-email: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
e78bae595c backup-cloud: early exit with :exit 2026-05-13 16:55:25 +02:00
Christian Hesse
a2d845c861 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-05-13 16:55:10 +02:00
Christian Hesse
abf2a5a809 Merge branch 'drop-builtin-trust-anchors' into next 2026-05-13 16:47:25 +02:00
Christian Hesse
13d7cf76a0 mod/notification-email: get property by name
This works now that we require RouterOS 7.21 anyway.
2026-05-13 16:47:25 +02:00
Christian Hesse
9a36fd1f1f INITIAL-COMMANDS: drop the old builtin-trust-anchors 2026-05-13 16:47:25 +02:00
Christian Hesse
24b04a2b43 mod/notification-email: use errors from command...
... instead of reading status from properties. This was introduced in
RouterOS 7.21beta2 (and we bump to 7.21 instead).
2026-05-13 16:47:25 +02:00
Christian Hesse
f82ba60f53 global-functions: $CertificateDownload: drop the old builtin-trust-anchors 2026-05-13 16:47:25 +02:00
Christian Hesse
7998fc68a5 global-functions: $CertificateAvailable: drop the old builtin-trust-anchors 2026-05-13 16:47:25 +02:00
Christian Hesse
da20b386e6 README: drop the old builtin-trust-anchors 2026-05-13 16:47:25 +02:00
Christian Hesse
656b7057b5 Merge branch 'toarray-delimiter' into next 2026-05-13 16:47:16 +02:00
Christian Hesse
63b8660f94 check-health: use :toarray's new delimiter= to split cert names 2026-05-13 16:46:07 +02:00
Christian Hesse
e4a07419fc fw-addr-lists: get both Let's Encrypt certificates for rsc.eworm.de 2026-05-13 16:37:36 +02:00
Christian Hesse
ab5ff7b1c1 fw-addr-lists: support giving several certificates...
... by delimiting with a colon.
2026-05-13 16:37:36 +02:00
Christian Hesse
ea5f4aff27 netwatch-dns: use :toarray's new delimiter= to split cert names
The new delimiter= parameter for :toarray with introduced in
RouterOS 7.21.
2026-05-13 16:29:47 +02:00
Christian Hesse
71c190b478 Merge branch 'lets-encrypt-old-chain' into next 2026-05-13 16:19:11 +02:00
Christian Hesse
a3de8aa081 global-functions: $CleanName: add missing colon 2026-05-13 16:19:11 +02:00
Christian Hesse
2a6567135e INITIAL-COMMANDS: Let's Encrypt switched back to old chain 2026-05-13 16:19:11 +02:00
Christian Hesse
7ad60ac704 README: Let's Encrypt switched back to old chain 2026-05-13 16:19:11 +02:00
Christian Hesse
59e0c4460e certs: Let's Encrypt switched back to old chain 2026-05-13 16:19:11 +02:00
Christian Hesse
6f2eb69ee0 global-functions: $ScriptInstallUpdate: Check for both LE certificates
Hmm... 🤨 Let's Encrypt is doing crazy things. My server was switched to
'Root YE' alredy, now it is back to 'ISRG Root X2'... 😳

So let's check for both for now.
2026-05-13 16:19:11 +02:00
11 changed files with 26 additions and 26 deletions

View file

@ -18,9 +18,9 @@ Run the complete base installation:
{
:local BaseUrl "https://rsc.eworm.de/main/";
:local CertCommonName "Root YE";
:local CertFileName "Root-YE.pem";
:local CertFingerprint "e14ffcad5b0025731006caa43a121a22d8e9700f4fb9cf852f02a708aa5d5666";
:local CertCommonName "ISRG Root X2";
:local CertFileName "ISRG-Root-X2.pem";
:local CertFingerprint "69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470";
:local CertSettings [ /certificate/settings/get ];
:if (!((($CertSettings->"builtin-trust-store") ~ "fetch" || \

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.7 KiB

Before After
Before After

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 5 KiB

Before After
Before After

View file

@ -122,18 +122,18 @@ If you intend to download the scripts from a
different location (for example from github.com) install the corresponding
certificate chain.
/tool/fetch "https://rsc.eworm.de/main/certs/Root-YE.pem" dst-path="root-ye.pem";
/tool/fetch "https://rsc.eworm.de/main/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem";
![screenshot: download certs](README.d/01-download-certs.avif)
> **Info**: Note that the command above does *not* verify server
> certificate, so if you want to be safe download with your workstations's
> browser from CA's website and transfer the file to your MikroTik device:
> *Let's Encrypt* / *ISRG* [Root YE ↗️](https://letsencrypt.org/certs/gen-y/root-ye.pem)
> *Let's Encrypt* / *ISRG* [ISRG Root X2 ↗️](https://letsencrypt.org/certs/isrg-root-x2.pem)
Then we import the certificate.
/certificate/import file-name="root-ye.pem" passphrase="";
/certificate/import file-name="isrg-root-x2.pem" passphrase="";
Do not worry that the command is not shown - that happens because it contains
a sensitive property, the passphrase.
@ -141,11 +141,11 @@ a sensitive property, the passphrase.
![screenshot: import certs](README.d/02-import-certs.avif)
For basic verification we rename the certificate and print it by
fingerprint. Make sure exactly this one certificate ("*Root-YE*")
fingerprint. Make sure exactly this one certificate ("*ISRG-Root-X2*")
is shown.
/certificate/set name="Root-YE" [ find where common-name="Root YE" ];
/certificate/print proplist=name,fingerprint where fingerprint="e14ffcad5b0025731006caa43a121a22d8e9700f4fb9cf852f02a708aa5d5666";
/certificate/set name="ISRG-Root-X2" [ find where common-name="ISRG Root X2" ];
/certificate/print proplist=name,fingerprint where fingerprint="69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470";
![screenshot: check certs](README.d/03-check-certs.avif)

View file

@ -12,12 +12,12 @@ DOMAINS_DUAL = \
cloudflare-dns.com/SSL-com-Root-Certification-Authority-ECC \
dns.google/GTS-Root-RX \
dns.quad9.net/DigiCert-Global-Root-G3 \
git.eworm.de/Root-YE \
git.eworm.de/ISRG-Root-X2 \
gitlab.com/USERTrust-RSA-Certification-Authority \
lists.blocklist.de/GTS-Root-R4 \
matrix.org/GTS-Root-R4 \
raw.githubusercontent.com/ISRG-Root-X1 \
rsc.eworm.de/Root-YE \
rsc.eworm.de/ISRG-Root-X2 \
upgrade.mikrotik.com/ISRG-Root-X1
DOMAINS_IPV4 = \
1.1.1.1/SSL-com-Root-Certification-Authority-ECC \

View file

@ -30,8 +30,7 @@
}
:local TempToNum do={
:global CharacterReplace;
:local T [ :toarray [ $CharacterReplace $1 "." "," ] ];
:local T [ :toarray delimiter="." $1 ];
:return ($T->0 * 10 + $T->1);
}

View file

@ -30,8 +30,7 @@
:global ValidateSyntax;
:local TempToNum do={
:global CharacterReplace;
:local T [ :toarray [ $CharacterReplace $1 "." "," ] ];
:local T [ :toarray delimiter="." $1 ];
:return ($T->0 * 10 + $T->1);
}

View file

@ -70,11 +70,13 @@
:local Data false;
:local TimeOut [ $EitherOr [ :totime ($List->"timeout") ] $FwAddrListTimeOut ];
:if ([ :len ($List->"cert") ] > 0) do={
:set CheckCertificate true;
:if ([ $CertificateAvailable ($List->"cert") "fetch" ] = false) do={
$LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \
" / " . $List->"url" . ") failed, trying anyway.");
:foreach Cert in=[ :toarray delimiter=":" ($List->"cert") ] do={
:if ([ :len ($Cert) ] > 0) do={
:set CheckCertificate true;
:if ([ $CertificateAvailable $Cert "fetch" ] = false) do={
$LogPrint warning $ScriptName ("Downloading required certificate (" . $FwListName . \
" / " . $List->"url" . ") failed, trying anyway.");
}
}
}

View file

@ -112,11 +112,11 @@
:global FwAddrLists {
# "allow"={
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/allow";
# cert="Root YE"; timeout=1w };
# cert="ISRG Root X2:Root YE"; timeout=1w };
# };
"block"={
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/block";
# cert="Root YE" };
# cert="ISRG Root X2:Root YE" };
{ url="https://raw.githubusercontent.com/stamparm/ipsum/refs/heads/master/levels/4.txt";
# # higher level (decrease the numerical value) for more addresses, and vice versa
cert="ISRG Root X1" };
@ -131,7 +131,7 @@
};
# "mikrotik"={
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/mikrotik";
# cert="Root YE"; timeout=1w };
# cert="ISRG Root X2:Root YE"; timeout=1w };
# };
};
:global FwAddrListTimeOut 1d;

View file

@ -1243,7 +1243,8 @@
:global SymbolForNotification;
:global ValidateSyntax;
:if ([ $CertificateAvailable "Root YE" "fetch" ] = false) do={
:if ([ $CertificateAvailable "ISRG Root X2" "fetch" ] = false || \
[ $CertificateAvailable "Root YE" "fetch" ] = false) do={
$LogPrint warning $0 ("Downloading certificate failed, trying without.");
}

View file

@ -16,7 +16,6 @@
:local ScriptName [ :jobname ];
:global CertificateAvailable;
:global CharacterReplace;
:global EitherOr;
:global IsDNSResolving;
:global LogPrint;
@ -100,7 +99,7 @@
}
:foreach DohServer in=$DohServers do={
:foreach DohCert in=[ :toarray [ $CharacterReplace ($DohServer->"doh-cert") ":" "," ] ] do={
:foreach DohCert in=[ :toarray delimiter=":" ($DohServer->"doh-cert") ] do={
:if ([ :len $DohCert ] > 0) do={
:if ([ $CertificateAvailable $DohCert "fetch" ] = false || \
[ $CertificateAvailable $DohCert "dns" ] = false) do={