From e93422670f1d0b93436900473f216908545f9d61 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 13 May 2026 16:25:14 +0200 Subject: [PATCH 1/4] netwatch-dns: use :toarray's new delimiter= to split cert names The new delimiter= parameter for :toarray with introduced in RouterOS 7.21. --- doc/netwatch-dns.md | 2 +- netwatch-dns.rsc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/doc/netwatch-dns.md b/doc/netwatch-dns.md index c80b819b..3aafd5d6 100644 --- a/doc/netwatch-dns.md +++ b/doc/netwatch-dns.md @@ -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.19-yellow?style=flat)](https://mikrotik.com/download/changelogs/) +[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.21-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) diff --git a/netwatch-dns.rsc b/netwatch-dns.rsc index 7c6a7b5b..ac7ce0ac 100644 --- a/netwatch-dns.rsc +++ b/netwatch-dns.rsc @@ -3,7 +3,7 @@ # Copyright (c) 2022-2026 Christian Hesse # https://rsc.eworm.de/COPYING.md # -# requires RouterOS, version=7.19 +# requires RouterOS, version=7.21 # requires device-mode, fetch # # monitor and manage dns/doh with netwatch @@ -17,7 +17,6 @@ :local ScriptName [ :jobname ]; :global CertificateAvailable; - :global CharacterReplace; :global EitherOr; :global IsDNSResolving; :global LogPrint; @@ -104,7 +103,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={ From 8eefd0ea3895dd7a36822390beb9ea05e69f64a9 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 13 May 2026 16:32:45 +0200 Subject: [PATCH 2/4] fw-addr-lists: support giving several certificates... ... by delimiting with a colon. --- doc/fw-addr-lists.md | 2 +- fw-addr-lists.rsc | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/doc/fw-addr-lists.md b/doc/fw-addr-lists.md index 5b29af7c..fe1e748c 100644 --- a/doc/fw-addr-lists.md +++ b/doc/fw-addr-lists.md @@ -4,7 +4,7 @@ Download, import and update firewall address-lists [![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.19-yellow?style=flat)](https://mikrotik.com/download/changelogs/) +[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.21-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) diff --git a/fw-addr-lists.rsc b/fw-addr-lists.rsc index ac15c652..7fe41588 100644 --- a/fw-addr-lists.rsc +++ b/fw-addr-lists.rsc @@ -3,7 +3,7 @@ # Copyright (c) 2023-2026 Christian Hesse # https://rsc.eworm.de/COPYING.md # -# requires RouterOS, version=7.19 +# requires RouterOS, version=7.21 # # download, import and update firewall address-lists # https://rsc.eworm.de/doc/fw-addr-lists.md @@ -72,11 +72,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."); + } } } From 395aaf50dd3d9fd744c82b254767aafcff382314 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 13 May 2026 16:35:27 +0200 Subject: [PATCH 3/4] fw-addr-lists: get both Let's Encrypt certificates for rsc.eworm.de --- global-config.rsc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/global-config.rsc b/global-config.rsc index 0bb572b5..86187431 100644 --- a/global-config.rsc +++ b/global-config.rsc @@ -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; From bde5b9440ecad449752ab0d435c2fc087b58eea7 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 13 May 2026 16:40:42 +0200 Subject: [PATCH 4/4] check-health: use :toarray's new delimiter= --- check-health.d/state.rsc | 2 +- check-health.d/temperature.rsc | 5 ++--- check-health.d/voltage.rsc | 2 +- check-health.rsc | 5 ++--- doc/check-health.md | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/check-health.d/state.rsc b/check-health.d/state.rsc index 0728b45e..9b3a07a7 100644 --- a/check-health.d/state.rsc +++ b/check-health.d/state.rsc @@ -3,7 +3,7 @@ # Copyright (c) 2019-2026 Christian Hesse # https://rsc.eworm.de/COPYING.md # -# requires RouterOS, version=7.19 +# requires RouterOS, version=7.21 # # check for RouterOS health state - state plugin # https://rsc.eworm.de/doc/check-health.md diff --git a/check-health.d/temperature.rsc b/check-health.d/temperature.rsc index fdce5dcb..36975cfe 100644 --- a/check-health.d/temperature.rsc +++ b/check-health.d/temperature.rsc @@ -3,7 +3,7 @@ # Copyright (c) 2019-2026 Christian Hesse # https://rsc.eworm.de/COPYING.md # -# requires RouterOS, version=7.19 +# requires RouterOS, version=7.21 # # check for RouterOS health state - temperature plugin # https://rsc.eworm.de/doc/check-health.md @@ -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); } diff --git a/check-health.d/voltage.rsc b/check-health.d/voltage.rsc index 67febc2b..380556cc 100644 --- a/check-health.d/voltage.rsc +++ b/check-health.d/voltage.rsc @@ -3,7 +3,7 @@ # Copyright (c) 2019-2026 Christian Hesse # https://rsc.eworm.de/COPYING.md # -# requires RouterOS, version=7.19 +# requires RouterOS, version=7.21 # # check for RouterOS health state - voltage plugin # https://rsc.eworm.de/doc/check-health.md diff --git a/check-health.rsc b/check-health.rsc index 51438966..2e864f50 100644 --- a/check-health.rsc +++ b/check-health.rsc @@ -3,7 +3,7 @@ # Copyright (c) 2019-2026 Christian Hesse # https://rsc.eworm.de/COPYING.md # -# requires RouterOS, version=7.19 +# requires RouterOS, version=7.21 # # check for RouterOS health state # https://rsc.eworm.de/doc/check-health.md @@ -31,8 +31,7 @@ :global ValidateSyntax; :local TempToNum do={ - :global CharacterReplace; - :local T [ :toarray [ $CharacterReplace $1 "." "," ] ]; + :local T [ :toarray delimiter="." $1 ]; :return ($T->0 * 10 + $T->1); } diff --git a/doc/check-health.md b/doc/check-health.md index 8ec79f5e..5af8f385 100644 --- a/doc/check-health.md +++ b/doc/check-health.md @@ -4,7 +4,7 @@ Notify about health state [![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.19-yellow?style=flat)](https://mikrotik.com/download/changelogs/) +[![required RouterOS version](https://img.shields.io/badge/RouterOS-7.21-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)