Compare commits
85 commits
routeros-7
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ce39b79f69 | ||
|
|
20bf609c44 | ||
|
|
b63e0fcb2f | ||
|
|
1555426687 | ||
|
|
97b99316b2 | ||
|
|
788400c458 | ||
|
|
eb59dd21ca | ||
|
|
79a4b369cb | ||
|
|
f0e6cbcfe1 | ||
|
|
d71ea804b0 | ||
|
|
e148df9e57 | ||
|
|
2f55bfaf00 | ||
|
|
ea6de35699 | ||
|
|
fb343c99e3 | ||
|
|
7be26a0712 | ||
|
|
6d718ec987 | ||
|
|
e341e1c30c | ||
|
|
b43b1b3955 | ||
|
|
1b46a5fd9b | ||
|
|
b13360e4b8 | ||
|
|
c9de6d8579 | ||
|
|
10374afc18 | ||
|
|
0c1d96f89d | ||
|
|
3ccaafd1b3 | ||
|
|
469f783a92 | ||
|
|
33c02e0609 | ||
|
|
6331505dbe | ||
|
|
0c4fb42616 | ||
|
|
f5189b8bd7 | ||
|
|
e2fe653035 | ||
|
|
b11be59b08 | ||
|
|
24de060904 | ||
|
|
14195c51ca | ||
|
|
e833dfcf25 | ||
|
|
512c54bd59 | ||
|
|
3d40b4419d | ||
|
|
a6d4e7e82c | ||
|
|
f6c2225f68 | ||
|
|
53b13b295a | ||
|
|
4eafcaa3ac | ||
|
|
c33eb41c9c | ||
|
|
78f9687558 | ||
|
|
e5de9de391 | ||
|
|
7928c5f054 | ||
|
|
757fa60e6f | ||
|
|
a22b62f588 | ||
|
|
cad104879c | ||
|
|
58da92e36a | ||
|
|
2c92c78b46 | ||
|
|
75633872aa | ||
|
|
dafcc1a0cb | ||
|
|
0199ea8884 | ||
|
|
584e507fd1 | ||
|
|
5715bc7b57 | ||
|
|
1c957dbc6d | ||
|
|
b7b3b43f3b | ||
|
|
df631b987d | ||
|
|
c8759381e9 | ||
|
|
d41f758550 | ||
|
|
e1c561dd91 | ||
|
|
4d0b4a1ff4 | ||
|
|
8af67af462 | ||
|
|
da280586b5 | ||
|
|
2e42f7963c | ||
|
|
fc3beac83b | ||
|
|
fefe11d1e8 | ||
|
|
b156fc43cf | ||
|
|
0fea300fea | ||
|
|
6570a84904 | ||
|
|
63db96bdcc | ||
|
|
88ff031368 | ||
|
|
81ba47a07d | ||
|
|
d748b69142 | ||
|
|
f5f00b70e3 | ||
|
|
4760515add | ||
|
|
d19b90df08 | ||
|
|
ea8ec6b580 | ||
|
|
dbdf295244 | ||
|
|
82020ddd73 | ||
|
|
a8e5b5226b | ||
|
|
4bfb591fa0 | ||
|
|
49d9fb1ffd | ||
|
|
7233dea5bb | ||
|
|
727495d9c4 | ||
|
|
4542c2b19e |
122 changed files with 623 additions and 288 deletions
|
|
@ -4,7 +4,7 @@ Installing from branches
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Certificate name from browser
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Past Contributions
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
63
DEBUG.md
Normal file
63
DEBUG.md
Normal file
|
|
@ -0,0 +1,63 @@
|
|||
Debug output and logs
|
||||
=====================
|
||||
|
||||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
[⬅️ Go back to main README](README.md)
|
||||
|
||||
Sometimes scripts do not behave as expected. In these cases debug output
|
||||
or logs can help.
|
||||
|
||||
## Debug output
|
||||
|
||||
Run this command in a terminal:
|
||||
|
||||
:set PrintDebug true;
|
||||
|
||||
You will then see debug output when running the script from terminal.
|
||||
|
||||
To revert to default output run:
|
||||
|
||||
:set PrintDebug false;
|
||||
|
||||
### Debug output for specific script
|
||||
|
||||
Even having debug output for a specific script or function only (or a
|
||||
set of) is possible. To enable debug output for `telegram-chat` run:
|
||||
|
||||
:set ($PrintDebugOverride->"telegram-chat") true;
|
||||
|
||||
## Debug logs
|
||||
|
||||
The debug info can go to system log. To make it show up in `memory` run:
|
||||
|
||||
/system/logging/add topics=script,debug action=memory;
|
||||
|
||||
Other actions (`disk`, `email`, `remote` or `support`) can be used as
|
||||
well. I do not recommend using `echo` - use [debug output](#debug-output)
|
||||
instead.
|
||||
|
||||
Disable or remote that setting to restore regular logging.
|
||||
|
||||
## Verbose output
|
||||
|
||||
Specific scripts can generate huge amount of output. These do use a function
|
||||
`$LogPrintVerbose`, which is declared, but has no code, intentionally.
|
||||
|
||||
If you *really* want that output set the function to be the same as
|
||||
`$LogPrint`:
|
||||
|
||||
:set LogPrintVerbose $LogPrint;
|
||||
|
||||
To revert that change just run:
|
||||
|
||||
:set LogPrintVerbose;
|
||||
|
||||
---
|
||||
[⬅️ Go back to main README](README.md)
|
||||
[⬆️ Go back to top](#top)
|
||||
|
|
@ -4,7 +4,7 @@ Initial commands
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ Run the complete base installation:
|
|||
{
|
||||
/tool/fetch "https://git.eworm.de/cgit/routeros-scripts/plain/certs/ISRG-Root-X2.pem" dst-path="isrg-root-x2.pem" as-value;
|
||||
:delay 1s;
|
||||
/certificate/import file-name=isrg-root-x2.pem passphrase="";
|
||||
/certificate/import file-name="isrg-root-x2.pem" passphrase="";
|
||||
:if ([ :len [ /certificate/find where fingerprint="69729b8e15a86efc177a57afb7171dfc64add28c2fca8cf1507e34453ccb1470" ] ] != 1) do={
|
||||
:error "Something is wrong with your certificates!";
|
||||
};
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ file to your MikroTik device.
|
|||
|
||||
Then we import the certificate.
|
||||
|
||||
/certificate/import file-name=isrg-root-x2.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.
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# print duplicate antries in wireless access list
|
||||
# https://rsc.eworm.de/doc/accesslist-duplicates.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# print duplicate antries in wireless access list
|
||||
# https://rsc.eworm.de/doc/accesslist-duplicates.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# print duplicate antries in wireless access list
|
||||
# https://rsc.eworm.de/doc/accesslist-duplicates.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# print duplicate antries in wireless access list
|
||||
# https://rsc.eworm.de/doc/accesslist-duplicates.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: backup-script, order=40
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# upload backup to MikroTik cloud
|
||||
# https://rsc.eworm.de/doc/backup-cloud.md
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
:global LogPrint;
|
||||
:global MkDir;
|
||||
:global RandomDelay;
|
||||
:global RmDir;
|
||||
:global ScriptFromTerminal;
|
||||
:global ScriptLock;
|
||||
:global SendNotification2;
|
||||
|
|
@ -97,7 +98,7 @@
|
|||
$LogPrint error $ScriptName ("Failed uploading backup for " . $Identity . " to cloud!");
|
||||
:set PackagesUpdateBackupFailure true;
|
||||
}
|
||||
/file/remove "tmpfs/backup-cloud";
|
||||
$RmDir "tmpfs/backup-cloud";
|
||||
} on-error={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: backup-script, order=20
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# create and email backup and config file
|
||||
# https://rsc.eworm.de/doc/backup-email.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: backup-script, order=70
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, scheduler
|
||||
#
|
||||
# save configuration to fallback partition
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: backup-script, order=50
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, fetch
|
||||
#
|
||||
# create and upload backup and config file
|
||||
|
|
@ -35,6 +35,8 @@
|
|||
:global LogPrint;
|
||||
:global MkDir;
|
||||
:global RandomDelay;
|
||||
:global RmDir;
|
||||
:global RmFile;
|
||||
:global ScriptFromTerminal;
|
||||
:global ScriptLock;
|
||||
:global SendNotification2;
|
||||
|
|
@ -99,7 +101,7 @@
|
|||
:set Failed 1;
|
||||
}
|
||||
|
||||
/file/remove ($FilePath . ".backup");
|
||||
$RmFile ($FilePath . ".backup");
|
||||
}
|
||||
|
||||
# create configuration export
|
||||
|
|
@ -118,7 +120,7 @@
|
|||
:set Failed 1;
|
||||
}
|
||||
|
||||
/file/remove ($FilePath . ".rsc");
|
||||
$RmFile ($FilePath . ".rsc");
|
||||
}
|
||||
|
||||
# global-config-overlay
|
||||
|
|
@ -139,7 +141,7 @@
|
|||
:set Failed 1;
|
||||
}
|
||||
|
||||
/file/remove ($FilePath . ".conf");
|
||||
$RmFile ($FilePath . ".conf");
|
||||
}
|
||||
|
||||
:local FileInfo do={
|
||||
|
|
@ -170,7 +172,7 @@
|
|||
:if ($Failed = 1) do={
|
||||
:set PackagesUpdateBackupFailure true;
|
||||
}
|
||||
/file/remove $DirName;
|
||||
$RmDir $DirName;
|
||||
} on-error={
|
||||
:global ExitError; $ExitError $ExitOK [ :jobname ];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Michael Gisbers <michael@gisbers.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# download and cleanup packages for CAP installation from CAPsMAN
|
||||
# https://rsc.eworm.de/doc/capsman-download-packages.md
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
:global DownloadPackage;
|
||||
:global LogPrint;
|
||||
:global MkDir;
|
||||
:global RmFile;
|
||||
:global ScriptLock;
|
||||
:global WaitFullyConnected;
|
||||
|
||||
|
|
@ -61,7 +62,7 @@
|
|||
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
|
||||
($File->"package-architecture") $PackagePath ] = true) do={
|
||||
:set Updated true;
|
||||
/file/remove $Package;
|
||||
$RmFile ($File->"name");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Michael Gisbers <michael@gisbers.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# download and cleanup packages for CAP installation from CAPsMAN
|
||||
# https://rsc.eworm.de/doc/capsman-download-packages.md
|
||||
|
|
@ -23,6 +23,7 @@
|
|||
:global DownloadPackage;
|
||||
:global LogPrint;
|
||||
:global MkDir;
|
||||
:global RmFile;
|
||||
:global ScriptLock;
|
||||
:global WaitFullyConnected;
|
||||
|
||||
|
|
@ -63,7 +64,7 @@
|
|||
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
|
||||
($File->"package-architecture") $PackagePath ] = true) do={
|
||||
:set Updated true;
|
||||
/file/remove $Package;
|
||||
$RmFile ($File->"name");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# Michael Gisbers <michael@gisbers.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# download and cleanup packages for CAP installation from CAPsMAN
|
||||
# https://rsc.eworm.de/doc/capsman-download-packages.md
|
||||
|
|
@ -22,6 +22,7 @@
|
|||
:global DownloadPackage;
|
||||
:global LogPrint;
|
||||
:global MkDir;
|
||||
:global RmFile;
|
||||
:global ScriptLock;
|
||||
:global WaitFullyConnected;
|
||||
|
||||
|
|
@ -61,7 +62,7 @@
|
|||
:if ([ $DownloadPackage ($File->"package-name") $InstalledVersion \
|
||||
($File->"package-architecture") $PackagePath ] = true) do={
|
||||
:set Updated true;
|
||||
/file/remove $Package;
|
||||
$RmFile ($File->"name");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: capsman-rolling-upgrade.capsman
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# upgrade CAPs one after another
|
||||
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: capsman-rolling-upgrade%TEMPL%
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# upgrade CAPs one after another
|
||||
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: capsman-rolling-upgrade.wifi
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# upgrade CAPs one after another
|
||||
# https://rsc.eworm.de/doc/capsman-rolling-upgrade.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# renew locally issued certificates
|
||||
# https://rsc.eworm.de/doc/certificate-renew-issued.md
|
||||
|
|
|
|||
|
|
@ -1,28 +0,0 @@
|
|||
# Issuer: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
|
||||
# Subject: CN=GlobalSign O=GlobalSign OU=GlobalSign Root CA - R3
|
||||
# Label: "GlobalSign Root CA - R3"
|
||||
# Serial: 4835703278459759426209954
|
||||
# MD5 Fingerprint: c5:df:b8:49:ca:05:13:55:ee:2d:ba:1a:c3:3e:b0:28
|
||||
# SHA1 Fingerprint: d6:9b:56:11:48:f0:1c:77:c5:45:78:c1:09:26:df:5b:85:69:76:ad
|
||||
# SHA256 Fingerprint: cb:b5:22:d7:b7:f1:27:ad:6a:01:13:86:5b:df:1c:d4:10:2e:7d:07:59:af:63:5a:7c:f4:72:0d:c9:63:c5:3b
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDXzCCAkegAwIBAgILBAAAAAABIVhTCKIwDQYJKoZIhvcNAQELBQAwTDEgMB4G
|
||||
A1UECxMXR2xvYmFsU2lnbiBSb290IENBIC0gUjMxEzARBgNVBAoTCkdsb2JhbFNp
|
||||
Z24xEzARBgNVBAMTCkdsb2JhbFNpZ24wHhcNMDkwMzE4MTAwMDAwWhcNMjkwMzE4
|
||||
MTAwMDAwWjBMMSAwHgYDVQQLExdHbG9iYWxTaWduIFJvb3QgQ0EgLSBSMzETMBEG
|
||||
A1UEChMKR2xvYmFsU2lnbjETMBEGA1UEAxMKR2xvYmFsU2lnbjCCASIwDQYJKoZI
|
||||
hvcNAQEBBQADggEPADCCAQoCggEBAMwldpB5BngiFvXAg7aEyiie/QV2EcWtiHL8
|
||||
RgJDx7KKnQRfJMsuS+FggkbhUqsMgUdwbN1k0ev1LKMPgj0MK66X17YUhhB5uzsT
|
||||
gHeMCOFJ0mpiLx9e+pZo34knlTifBtc+ycsmWQ1z3rDI6SYOgxXG71uL0gRgykmm
|
||||
KPZpO/bLyCiR5Z2KYVc3rHQU3HTgOu5yLy6c+9C7v/U9AOEGM+iCK65TpjoWc4zd
|
||||
QQ4gOsC0p6Hpsk+QLjJg6VfLuQSSaGjlOCZgdbKfd/+RFO+uIEn8rUAVSNECMWEZ
|
||||
XriX7613t2Saer9fwRPvm2L7DWzgVGkWqQPabumDk3F2xmmFghcCAwEAAaNCMEAw
|
||||
DgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB/wQFMAMBAf8wHQYDVR0OBBYEFI/wS3+o
|
||||
LkUkrk1Q+mOai97i3Ru8MA0GCSqGSIb3DQEBCwUAA4IBAQBLQNvAUKr+yAzv95ZU
|
||||
RUm7lgAJQayzE4aGKAczymvmdLm6AC2upArT9fHxD4q/c2dKg8dEe3jgr25sbwMp
|
||||
jjM5RcOO5LlXbKr8EpbsU8Yt5CRsuZRj+9xTaGdWPoO4zzUhw8lo/s7awlOqzJCK
|
||||
6fBdRoyV3XpYKBovHd7NADdBj+1EbddTKJd+82cEHhXXipa0095MJ6RMG3NzdvQX
|
||||
mcIfeg7jLQitChws/zyrVQ4PkX4268NXSb7hLi18YIvDQVETI53O9zJrlAGomecs
|
||||
Mx86OyXShkDOOyyGeMlhLxS67ttVb9+E7gUJTb0o2HLO02JQZR7rkpeDMdmztcpH
|
||||
WD9f
|
||||
-----END CERTIFICATE-----
|
||||
|
|
@ -15,7 +15,7 @@ DOMAINS_DUAL = \
|
|||
git.eworm.de/ISRG-Root-X2 \
|
||||
lists.blocklist.de/Certum-Trusted-Network-CA \
|
||||
matrix.org/GTS-Root-R4 \
|
||||
raw.githubusercontent.com/DigiCert-Global-Root-G2 \
|
||||
raw.githubusercontent.com/USERTrust-RSA-Certification-Authority \
|
||||
rsc.eworm.de/ISRG-Root-X2 \
|
||||
upgrade.mikrotik.com/ISRG-Root-X1
|
||||
DOMAINS_IPV4 = \
|
||||
|
|
@ -23,12 +23,10 @@ DOMAINS_IPV4 = \
|
|||
8.8.8.8/GTS-Root-R1 \
|
||||
9.9.9.9/DigiCert-Global-Root-G3 \
|
||||
api.mullvad.net/ISRG-Root-X1 \
|
||||
feodotracker.abuse.ch/GlobalSign \
|
||||
ipv4.showipv6.de/ISRG-Root-X1 \
|
||||
ipv4.tunnelbroker.net/Starfield-Root-Certificate-Authority-G2 \
|
||||
mkcert.org/ISRG-Root-X1 \
|
||||
ntfy.sh/ISRG-Root-X1 \
|
||||
sslbl.abuse.ch/GlobalSign \
|
||||
www.dshield.org/ISRG-Root-X1 \
|
||||
www.spamhaus.org/GTS-Root-R4
|
||||
DOMAINS_IPV6 = \
|
||||
|
|
|
|||
41
certs/USERTrust-RSA-Certification-Authority.pem
Normal file
41
certs/USERTrust-RSA-Certification-Authority.pem
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Issuer: CN=USERTrust RSA Certification Authority O=The USERTRUST Network
|
||||
# Subject: CN=USERTrust RSA Certification Authority O=The USERTRUST Network
|
||||
# Label: "USERTrust RSA Certification Authority"
|
||||
# Serial: 2645093764781058787591871645665788717
|
||||
# MD5 Fingerprint: 1b:fe:69:d1:91:b7:19:33:a3:72:a8:0f:e1:55:e5:b5
|
||||
# SHA1 Fingerprint: 2b:8f:1b:57:33:0d:bb:a2:d0:7a:6c:51:f7:0e:e9:0d:da:b9:ad:8e
|
||||
# SHA256 Fingerprint: e7:93:c9:b0:2f:d8:aa:13:e2:1c:31:22:8a:cc:b0:81:19:64:3b:74:9c:89:89:64:b1:74:6d:46:c3:d4:cb:d2
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB
|
||||
iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
|
||||
cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
|
||||
BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAw
|
||||
MjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMCVVMxEzARBgNV
|
||||
BAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
|
||||
aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2Vy
|
||||
dGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
|
||||
AoICAQCAEmUXNg7D2wiz0KxXDXbtzSfTTK1Qg2HiqiBNCS1kCdzOiZ/MPans9s/B
|
||||
3PHTsdZ7NygRK0faOca8Ohm0X6a9fZ2jY0K2dvKpOyuR+OJv0OwWIJAJPuLodMkY
|
||||
tJHUYmTbf6MG8YgYapAiPLz+E/CHFHv25B+O1ORRxhFnRghRy4YUVD+8M/5+bJz/
|
||||
Fp0YvVGONaanZshyZ9shZrHUm3gDwFA66Mzw3LyeTP6vBZY1H1dat//O+T23LLb2
|
||||
VN3I5xI6Ta5MirdcmrS3ID3KfyI0rn47aGYBROcBTkZTmzNg95S+UzeQc0PzMsNT
|
||||
79uq/nROacdrjGCT3sTHDN/hMq7MkztReJVni+49Vv4M0GkPGw/zJSZrM233bkf6
|
||||
c0Plfg6lZrEpfDKEY1WJxA3Bk1QwGROs0303p+tdOmw1XNtB1xLaqUkL39iAigmT
|
||||
Yo61Zs8liM2EuLE/pDkP2QKe6xJMlXzzawWpXhaDzLhn4ugTncxbgtNMs+1b/97l
|
||||
c6wjOy0AvzVVdAlJ2ElYGn+SNuZRkg7zJn0cTRe8yexDJtC/QV9AqURE9JnnV4ee
|
||||
UB9XVKg+/XRjL7FQZQnmWEIuQxpMtPAlR1n6BB6T1CZGSlCBst6+eLf8ZxXhyVeE
|
||||
Hg9j1uliutZfVS7qXMYoCAQlObgOK6nyTJccBz8NUvXt7y+CDwIDAQABo0IwQDAd
|
||||
BgNVHQ4EFgQUU3m/WqorSs9UgOHYm8Cd8rIDZsswDgYDVR0PAQH/BAQDAgEGMA8G
|
||||
A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAFzUfA3P9wF9QZllDHPF
|
||||
Up/L+M+ZBn8b2kMVn54CVVeWFPFSPCeHlCjtHzoBN6J2/FNQwISbxmtOuowhT6KO
|
||||
VWKR82kV2LyI48SqC/3vqOlLVSoGIG1VeCkZ7l8wXEskEVX/JJpuXior7gtNn3/3
|
||||
ATiUFJVDBwn7YKnuHKsSjKCaXqeYalltiz8I+8jRRa8YFWSQEg9zKC7F4iRO/Fjs
|
||||
8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM8WcR
|
||||
iQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYze
|
||||
Sf7dNXGiFSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZ
|
||||
XHlKYC6SQK5MNyosycdiyA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/
|
||||
qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9cJ2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRB
|
||||
VXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGwsAvgnEzDHNb842m1R0aB
|
||||
L6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gxQ+6IHdfG
|
||||
jjxDah2nGN59PRbxYvnKkKj9
|
||||
-----END CERTIFICATE-----
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, fetch
|
||||
#
|
||||
# check for certificate validity
|
||||
|
|
@ -44,26 +44,32 @@
|
|||
:global EscapeForRegEx;
|
||||
:global FetchUserAgentStr;
|
||||
:global LogPrint;
|
||||
:global RmFile;
|
||||
:global UrlEncode;
|
||||
:global WaitForFile;
|
||||
|
||||
:local Return false;
|
||||
:foreach Type in={ "p12"; "pem" } do={
|
||||
:local CertFileName ([ $UrlEncode $FetchName ] . "." . $Type);
|
||||
$LogPrint debug $ScriptName ("Trying type '" . $Type . "' for '" . $CertName . \
|
||||
"' (file '" . $CertFileName . "')...");
|
||||
|
||||
:foreach Type in={ ".pem"; ".p12" } do={
|
||||
:local CertFileName ([ $UrlEncode $FetchName ] . $Type);
|
||||
:do {
|
||||
/tool/fetch check-certificate=yes-without-crl http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) \
|
||||
($CertRenewUrl . $CertFileName) dst-path=$CertFileName as-value;
|
||||
$WaitForFile $CertFileName;
|
||||
|
||||
:local DecryptionFailed true;
|
||||
:foreach PassPhrase in=$CertRenewPass do={
|
||||
:local Result [ /certificate/import file-name=$CertFileName passphrase=$PassPhrase as-value ];
|
||||
:if ($Result->"decryption-failures" = 0) do={
|
||||
:set DecryptionFailed false;
|
||||
}
|
||||
:foreach I,PassPhrase in=$CertRenewPass do={
|
||||
:do {
|
||||
$LogPrint debug $ScriptName ("Trying " . $I . ". passphrase... ");
|
||||
:local Result [ /certificate/import file-name=$CertFileName passphrase=$PassPhrase as-value ];
|
||||
:if ($Result->"decryption-failures" = 0) do={
|
||||
$LogPrint debug $ScriptName ("Success!");
|
||||
:set DecryptionFailed false;
|
||||
}
|
||||
} on-error={ }
|
||||
}
|
||||
/file/remove [ find where name=$CertFileName ];
|
||||
$RmFile $CertFileName;
|
||||
|
||||
:if ($DecryptionFailed = true) do={
|
||||
$LogPrint warning $ScriptName ("Decryption failed for certificate file '" . $CertFileName . "'.");
|
||||
|
|
@ -76,13 +82,13 @@
|
|||
$CertificateNameByCN [ /certificate/get $CertInChain common-name ];
|
||||
}
|
||||
|
||||
:set Return true;
|
||||
:return true;
|
||||
} on-error={
|
||||
$LogPrint debug $ScriptName ("Could not download certificate file '" . $CertFileName . "'.");
|
||||
}
|
||||
}
|
||||
|
||||
:return $Return;
|
||||
:return false;
|
||||
}
|
||||
|
||||
:local FormatInfo do={
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# check for RouterOS health state - state plugin
|
||||
# https://rsc.eworm.de/doc/check-health.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# check for RouterOS health state - temperature plugin
|
||||
# https://rsc.eworm.de/doc/check-health.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# check for RouterOS health state - voltage plugin
|
||||
# https://rsc.eworm.de/doc/check-health.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# check for RouterOS health state
|
||||
# https://rsc.eworm.de/doc/check-health.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# check for LTE firmware upgrade, send notification
|
||||
# https://rsc.eworm.de/doc/check-lte-firmware-upgrade.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, fetch, scheduler
|
||||
#
|
||||
# check for RouterOS update, send notification and/or install
|
||||
|
|
@ -66,6 +66,27 @@
|
|||
:error "A reboot for update is already scheduled.";
|
||||
}
|
||||
|
||||
:local License [ /system/license/get ];
|
||||
:if ([ :typeof ($License->"deadline-at") ] = "str") do={
|
||||
:if ([ :len ($License->"next-renewal-at") ] = 0 && ($License->"limited-upgrades") = true) do={
|
||||
$LogPrint warning $ScriptName ("Your license expired on " . ($License->"deadline-at") . "!");
|
||||
$SendNotification2 ({ origin=$ScriptName; \
|
||||
subject=([ $SymbolForNotification "warning-sign" ] . "License expired!"); \
|
||||
message=("Your license expired on " . ($License->"deadline-at") . \
|
||||
", can no longer update RouterOS on " . $Identity . "...") });
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
}
|
||||
|
||||
:if ([ :totime ($License->"deadline-at") ] - 3w < [ :timestamp ]) do={
|
||||
$LogPrint warning $ScriptName ("Your license will expire on " . ($License->"deadline-at") . "!");
|
||||
$SendNotification2 ({ origin=$ScriptName; \
|
||||
subject=([ $SymbolForNotification "warning-sign" ] . "License about to expire!"); \
|
||||
message=("Your license failed to renew and is about to expire on " . \
|
||||
($License->"deadline-at") . " on " . $Identity . "...") });
|
||||
}
|
||||
}
|
||||
|
||||
$LogPrint debug $ScriptName ("Checking for updates...");
|
||||
/system/package/update/check-for-updates without-paging as-value;
|
||||
:local Update [ /system/package/update/get ];
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=40
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# collect wireless mac adresses in access list
|
||||
# https://rsc.eworm.de/doc/collect-wireless-mac.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=40
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# collect wireless mac adresses in access list
|
||||
# https://rsc.eworm.de/doc/collect-wireless-mac.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=40
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# collect wireless mac adresses in access list
|
||||
# https://rsc.eworm.de/doc/collect-wireless-mac.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=40
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# collect wireless mac adresses in access list
|
||||
# https://rsc.eworm.de/doc/collect-wireless-mac.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=60
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# update dhcp-server lease comment with infos from access-list
|
||||
# https://rsc.eworm.de/doc/dhcp-lease-comment.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=60
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# update dhcp-server lease comment with infos from access-list
|
||||
# https://rsc.eworm.de/doc/dhcp-lease-comment.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=60
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# update dhcp-server lease comment with infos from access-list
|
||||
# https://rsc.eworm.de/doc/dhcp-lease-comment.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=60
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# update dhcp-server lease comment with infos from access-list
|
||||
# https://rsc.eworm.de/doc/dhcp-lease-comment.md
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Find and remove access list duplicates
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Upload backup to Mikrotik cloud
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Send backup via e-mail
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Save configuration to fallback partition
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Upload backup to server
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Download packages for CAP upgrade from CAPsMAN
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Run rolling CAP upgrades from CAPsMAN
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Renew locally issued certificates
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Renew certificates and notify on expiration
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Notify about health state
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Notify on LTE firmware upgrade
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Notify on RouterOS update
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Collect MAC addresses in wireless access list
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Comment DHCP leases with info from access list
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Automatically upgrade firmware and reboot
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,10 +18,11 @@ Description
|
|||
|
||||
This script downloads, imports and updates firewall address-lists. Its main
|
||||
purpose is to block attacking ip addresses, spam hosts, command-and-control
|
||||
servers and similar malicious entities. The default configuration contains
|
||||
lists from [abuse.ch](https://abuse.ch/), [dshield.org](https://dshield.org/)
|
||||
and [blocklist.de](https://www.blocklist.de/), and
|
||||
lists from [spamhaus.org](https://spamhaus.org/) are prepared.
|
||||
servers and similar malicious entities. The default configuration contains a
|
||||
[collective list by GitHub user @stamparm](https://github.com/stamparm/ipsum),
|
||||
lists from [dshield.org](https://dshield.org/) and
|
||||
[blocklist.de](https://www.blocklist.de/), and lists from
|
||||
[spamhaus.org](https://spamhaus.org/) are prepared.
|
||||
|
||||
The address-lists are updated in place, so after initial import you will not
|
||||
see situation when the lists are not populated.
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Wait for global functions and modules
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Send GPS position to server
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Use WPA network with hotspot credentials
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Manage IP addresses with bridge status
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Create DNS records for IPSec peers
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Update configuration on IPv6 prefix change
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Run other scripts on DHCP lease
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Manage LEDs dark mode
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Forward log messages via notification
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
@ -22,15 +22,15 @@ server (see `/system/logging`). This has some limitation, however:
|
|||
* does not work early after boot if network connectivity is not
|
||||
yet established, or breaks intermittently
|
||||
* lots of messages generate a flood of mails
|
||||
* Matrix and Telegram are not supported
|
||||
* Matrix, Ntfy and Telegram are not supported
|
||||
|
||||
The script works around the limitations, for example it does:
|
||||
|
||||
* read from `/log`, including messages from early boot
|
||||
* skip multi-repeated messages
|
||||
* rate-limit itself to mitigate flooding
|
||||
* forward via notification (which includes *e-mail*, *Matrix* and *Telegram*
|
||||
when installed and configured, see below)
|
||||
* forward via notification (which includes *e-mail*, *Matrix*, *Ntfy* and
|
||||
*Telegram* when installed and configured, see below)
|
||||
|
||||
It is intended to be run periodically from scheduler, then collects new
|
||||
log messages and forwards them via notification.
|
||||
|
|
@ -53,6 +53,12 @@ Just install the script:
|
|||
Configuration
|
||||
-------------
|
||||
|
||||
The default configuration should provide reasonable presets, filtering
|
||||
*info*, and effectively forwarding *warning* and *error*.
|
||||
|
||||
> 💡️ **Hint**: Please try with defaults first, especially if you are not
|
||||
> familiar with regular expressions!
|
||||
|
||||
The configuration goes to `global-config-overlay`, these are the parameters:
|
||||
|
||||
* `LogForwardFilter`: define topics *not* to be forwarded
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Manage ports in bridge
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Manage VLANs on bridge ports
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Inspect variables
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ IP address calculation
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Send notifications via e-mail
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Send notifications via Matrix
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Send notifications via Ntfy
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
BIN
doc/mod/notification-telegram.d/getchatid.avif
Normal file
BIN
doc/mod/notification-telegram.d/getchatid.avif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.8 KiB |
|
|
@ -4,7 +4,7 @@ Send notifications via Telegram
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
@ -38,14 +38,21 @@ create your own bot:
|
|||
|
||||

|
||||
|
||||
Now open a chat with your bot and start it by clicking the `START` button.
|
||||
Set that token from *BotFather* (use your own!) to `TelegramTokenId`, for
|
||||
now just temporarily:
|
||||
|
||||
Open just another chat with [GetIDs Bot](https://t.me/getidsbot), again start
|
||||
with the `START` button. It will send you some information, including the
|
||||
`id`, just below `You`.
|
||||
:set TelegramTokenId "5214364459:AAHLwf1o7ybbKDo6pY24Kd2bZ5rjCakDXTc";
|
||||
|
||||
Now open a chat with your bot and start it by clicking the `START` button,
|
||||
then send your first message. Any text will do. On your device run
|
||||
`$GetTelegramChatId` to retrieve the chat id:
|
||||
|
||||
$GetTelegramChatId;
|
||||
|
||||

|
||||
|
||||
Finally edit `global-config-overlay`, add `TelegramTokenId` with the token
|
||||
from *BotFather* and `TelegramChatId` with your id from *GetIDs Bot*. Then
|
||||
from *BotFather* and `TelegramChatId` with your retrieved chat id. Then
|
||||
reload the configuration.
|
||||
|
||||
> ℹ️ **Info**: Copy relevant configuration from
|
||||
|
|
@ -54,9 +61,13 @@ reload the configuration.
|
|||
|
||||
### Notifications to a group
|
||||
|
||||
Sending notifications to a group is possible as well. Add your bot and the
|
||||
*GetIDs Bot* to a group, then use the group's id (which starts with a dash)
|
||||
for `TelegramChatId`. Then remove *GetIDs Bot* from group.
|
||||
Sending notifications to a group is possible as well. Add your bot to a group
|
||||
and make it an admin (required for read access!) and send a message and run
|
||||
`$GetTelegramChatId` again. Then use that chat id (which starts with a dash)
|
||||
for `TelegramChatId`.
|
||||
|
||||
Groups can enable the `Topics` feature. Use `TelegramThreadId` to send to a
|
||||
specific topic in a group.
|
||||
|
||||
Usage and invocation
|
||||
--------------------
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Download script and run it once
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Mode button with multiple presses
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Visualize OSPF state via LEDs
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Manage system update
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Run scripts on ppp connection
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Act on received SMS
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Forward received SMS
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Play Super Mario theme
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Install LTE firmware upgrade
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Update GRE configuration with dynamic addresses
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ Update tunnelbroker configuration
|
|||
[](https://github.com/eworm-de/routeros-scripts/stargazers)
|
||||
[](https://github.com/eworm-de/routeros-scripts/network)
|
||||
[](https://github.com/eworm-de/routeros-scripts/watchers)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://mikrotik.com/download/changelogs/)
|
||||
[](https://t.me/routeros_scripts)
|
||||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=A4ZXBD6YS2W8J)
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2022-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# install firmware upgrade, and reboot
|
||||
# https://rsc.eworm.de/doc/firmware-upgrade-reboot.md
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
:global HumanReadableNum;
|
||||
:global LogPrint;
|
||||
:global LogPrintOnce;
|
||||
:global LogPrintVerbose;
|
||||
:global ScriptLock;
|
||||
:global WaitFullyConnected;
|
||||
|
||||
|
|
@ -36,6 +37,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
:local GetBranch do={
|
||||
:global EitherOr;
|
||||
:return [ :pick [ :convert transform=md5 to=hex [ :pick $1 0 [ $EitherOr [ :find $1 "/" ] [ :len $1 ] ] ] ] 0 2 ];
|
||||
}
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
|
|
@ -99,17 +105,24 @@
|
|||
:set Address ([ :pick $Line 0 [ $FindDelim $Line ] ] . ($List->"cidr"));
|
||||
}
|
||||
:do {
|
||||
:local Branch [ $GetBranch $Address ];
|
||||
:if ($Address ~ "^[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}(/[0-9]{1,2})?\$") do={
|
||||
:set ($IPv4Addresses->$Address) $TimeOut;
|
||||
:if ($Address ~ "/32\$") do={
|
||||
:set Address [ :pick $Address 0 ([ :len $Address ] - 3) ];
|
||||
}
|
||||
:set ($IPv4Addresses->$Branch->$Address) $TimeOut;
|
||||
:error true;
|
||||
}
|
||||
:if ($Address ~ "^[0-9a-zA-Z]*:[0-9a-zA-Z:\\.]+(/[0-9]{1,3})?\$") do={
|
||||
:set ($IPv6Addresses->$Address) $TimeOut;
|
||||
:if ($Address ~ "/128\$") do={
|
||||
:set Address [ :pick $Address 0 ([ :len $Address ] - 4) ];
|
||||
}
|
||||
:set ($IPv6Addresses->$Branch->$Address) $TimeOut;
|
||||
:error true;
|
||||
}
|
||||
:if ($Address ~ "^[\\.a-zA-Z0-9-]+\\.[a-zA-Z]{2,}\$") do={
|
||||
:set ($IPv4Addresses->$Address) $TimeOut;
|
||||
:set ($IPv6Addresses->$Address) $TimeOut;
|
||||
:set ($IPv4Addresses->$Branch->$Address) $TimeOut;
|
||||
:set ($IPv6Addresses->$Branch->$Address) $TimeOut;
|
||||
:error true;
|
||||
}
|
||||
} on-error={ }
|
||||
|
|
@ -119,15 +132,17 @@
|
|||
:foreach Entry in=[ /ip/firewall/address-list/find where \
|
||||
list=$FwListName comment=$ListComment ] do={
|
||||
:local Address [ /ip/firewall/address-list/get $Entry address ];
|
||||
:if ([ :typeof ($IPv4Addresses->$Address) ] = "time") do={
|
||||
$LogPrint debug $ScriptName ("Renewing IPv4 address in list '" . $FwListName . \
|
||||
"' with " . ($IPv4Addresses->$Address) . ": " . $Address);
|
||||
/ip/firewall/address-list/set $Entry timeout=($IPv4Addresses->$Address);
|
||||
:set ($IPv4Addresses->$Address);
|
||||
:local Branch [ $GetBranch $Address ];
|
||||
:local TimeOut ($IPv4Addresses->$Branch->$Address);
|
||||
:if ([ :typeof $TimeOut ] = "time") do={
|
||||
$LogPrintVerbose debug $ScriptName ("Renewing IPv4 address in list '" . $FwListName . \
|
||||
"' with " . $TimeOut . ": " . $Address);
|
||||
/ip/firewall/address-list/set $Entry timeout=$TimeOut;
|
||||
:set ($IPv4Addresses->$Branch->$Address);
|
||||
:set CntRenew ($CntRenew + 1);
|
||||
} else={
|
||||
:if ($Failure = false) do={
|
||||
$LogPrint debug $ScriptName ("Removing IPv4 address from list '" . $FwListName . \
|
||||
$LogPrintVerbose debug $ScriptName ("Removing IPv4 address from list '" . $FwListName . \
|
||||
"': " . $Address);
|
||||
/ip/firewall/address-list/remove $Entry;
|
||||
:set CntRemove ($CntRemove + 1);
|
||||
|
|
@ -138,15 +153,17 @@
|
|||
:foreach Entry in=[ /ipv6/firewall/address-list/find where \
|
||||
list=$FwListName comment=$ListComment ] do={
|
||||
:local Address [ /ipv6/firewall/address-list/get $Entry address ];
|
||||
:if ([ :typeof ($IPv6Addresses->$Address) ] = "time") do={
|
||||
$LogPrint debug $ScriptName ("Renewing IPv6 address in list '" . $FwListName . \
|
||||
"' with " . ($IPv6Addresses->$Address) . ": " . $Address);
|
||||
/ipv6/firewall/address-list/set $Entry timeout=($IPv6Addresses->$Address);
|
||||
:set ($IPv6Addresses->$Address);
|
||||
:local Branch [ $GetBranch $Address ];
|
||||
:local TimeOut ($IPv6Addresses->$Branch->$Address);
|
||||
:if ([ :typeof $TimeOut ] = "time") do={
|
||||
$LogPrintVerbose debug $ScriptName ("Renewing IPv6 address in list '" . $FwListName . \
|
||||
"' with " . $TimeOut . ": " . $Address);
|
||||
/ipv6/firewall/address-list/set $Entry timeout=$TimeOut;
|
||||
:set ($IPv6Addresses->$Branch->$Address);
|
||||
:set CntRenew ($CntRenew + 1);
|
||||
} else={
|
||||
:if ($Failure = false) do={
|
||||
$LogPrint debug $ScriptName ("Removing IPv6 address from list '" . $FwListName . \
|
||||
$LogPrintVerbose debug $ScriptName ("Removing IPv6 address from list '" . $FwListName . \
|
||||
"': " . $Address);
|
||||
/ipv6/firewall/address-list/remove $Entry;
|
||||
:set CntRemove ($CntRemove + 1);
|
||||
|
|
@ -154,31 +171,35 @@
|
|||
}
|
||||
}
|
||||
|
||||
:foreach Address,Timeout in=$IPv4Addresses do={
|
||||
$LogPrint debug $ScriptName ("Adding IPv4 address to list '" . $FwListName . \
|
||||
"' with " . $Timeout . ": " . $Address);
|
||||
:do {
|
||||
/ip/firewall/address-list/add list=$FwListName comment=$ListComment \
|
||||
address=$Address timeout=$Timeout;
|
||||
:set ($IPv4Addresses->$Address);
|
||||
:set CntAdd ($CntAdd + 1);
|
||||
} on-error={
|
||||
$LogPrint warning $ScriptName ("Failed to add IPv4 address to list '" . $FwListName . \
|
||||
"': " . $Address);
|
||||
:foreach BranchName,Branch in=$IPv4Addresses do={
|
||||
$LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName);
|
||||
:foreach Address,Timeout in=$Branch do={
|
||||
$LogPrintVerbose debug $ScriptName ("Adding IPv4 address to list '" . $FwListName . \
|
||||
"' with " . $Timeout . ": " . $Address);
|
||||
:do {
|
||||
/ip/firewall/address-list/add list=$FwListName comment=$ListComment \
|
||||
address=$Address timeout=$Timeout;
|
||||
:set CntAdd ($CntAdd + 1);
|
||||
} on-error={
|
||||
$LogPrint warning $ScriptName ("Failed to add IPv4 address to list '" . $FwListName . \
|
||||
"': " . $Address);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:foreach Address,Timeout in=$IPv6Addresses do={
|
||||
$LogPrint debug $ScriptName ("Adding IPv6 address to list '" . $FwListName . \
|
||||
"' with " . $Timeout . ": " . $Address);
|
||||
:do {
|
||||
/ipv6/firewall/address-list/add list=$FwListName comment=$ListComment \
|
||||
address=$Address timeout=$Timeout;
|
||||
:set ($IPv6Addresses->$Address);
|
||||
:set CntAdd ($CntAdd + 1);
|
||||
} on-error={
|
||||
$LogPrint warning $ScriptName ("Failed to add IPv6 address to list '" . $FwListName . \
|
||||
"': " . $Address);
|
||||
:foreach BranchName,Branch in=$IPv6Addresses do={
|
||||
$LogPrintVerbose debug $ScriptName ("Handling branch: " . $BranchName);
|
||||
:foreach Address,Timeout in=$Branch do={
|
||||
$LogPrintVerbose debug $ScriptName ("Adding IPv6 address to list '" . $FwListName . \
|
||||
"' with " . $Timeout . ": " . $Address);
|
||||
:do {
|
||||
/ipv6/firewall/address-list/add list=$FwListName comment=$ListComment \
|
||||
address=$Address timeout=$Timeout;
|
||||
:set CntAdd ($CntAdd + 1);
|
||||
} on-error={
|
||||
$LogPrint warning $ScriptName ("Failed to add IPv6 address to list '" . $FwListName . \
|
||||
"': " . $Address);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@
|
|||
:global TelegramChatId "";
|
||||
#:global TelegramTokenId "123456:ABCDEF-GHI";
|
||||
#:global TelegramChatId "12345678";
|
||||
# Use this to send notifications to a specific topic in group.
|
||||
:global TelegramThreadId "";
|
||||
# Using telegram-chat you have to define trusted chat ids (not group ids!)
|
||||
# or user names. Groups allow to chat with devices simultaneously.
|
||||
#:global TelegramChatIdsTrusted {
|
||||
|
|
@ -56,9 +58,9 @@
|
|||
# install the module:
|
||||
# $ScriptInstallUpdate mod/notification-ntfy
|
||||
:global NtfyServer "ntfy.sh";
|
||||
:global NtfyServerUser [];
|
||||
:global NtfyServerPass [];
|
||||
:global NtfyServerToken [];
|
||||
:global NtfyServerUser "";
|
||||
:global NtfyServerPass "";
|
||||
:global NtfyServerToken "";
|
||||
:global NtfyTopic "";
|
||||
|
||||
# It is possible to override e-mail, Telegram, Matrix and Ntfy setting
|
||||
|
|
@ -90,6 +92,7 @@
|
|||
:global BackupPartitionCopyBeforeFeatureUpdate false;
|
||||
|
||||
# This defines the settings for firewall address-lists (fw-addr-lists).
|
||||
# Warning: Mind your device's resources - memory and processing!
|
||||
:global FwAddrLists {
|
||||
# "allow"={
|
||||
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/allow";
|
||||
|
|
@ -98,10 +101,9 @@
|
|||
"block"={
|
||||
# { url="https://rsc.eworm.de/main/fw-addr-lists.d/block";
|
||||
# cert="ISRG Root X2" };
|
||||
{ url="https://feodotracker.abuse.ch/downloads/ipblocklist_recommended.txt";
|
||||
cert="GlobalSign" };
|
||||
{ url="https://sslbl.abuse.ch/blacklist/sslipblacklist.txt";
|
||||
cert="GlobalSign" };
|
||||
{ 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="USERTrust RSA Certification Authority" };
|
||||
{ url="https://www.dshield.org/block.txt"; cidr="/24";
|
||||
cert="ISRG Root X1" };
|
||||
{ url="https://lists.blocklist.de/lists/strongips.txt";
|
||||
|
|
@ -119,17 +121,17 @@
|
|||
:global FwAddrListTimeOut 1d;
|
||||
|
||||
# This defines what log messages to filter or include by topic or message
|
||||
# text. Regular expressions are supported. Do *NOT* set an empty string,
|
||||
# that will filter or include everything!
|
||||
# text. Regular expressions are supported. An empty string has a special
|
||||
# meaning not to filter or include anything.
|
||||
# These are filters, so excluding messages from forwarding.
|
||||
:global LogForwardFilter "(debug|info|packet|raw)";
|
||||
:global LogForwardFilterMessage [];
|
||||
:global LogForwardFilterMessage "";
|
||||
#:global LogForwardFilterMessage "message text";
|
||||
#:global LogForwardFilterMessage "(message text|another text|...)";
|
||||
# ... and another setting with reverse logic. This includes messages even
|
||||
# if filtered above.
|
||||
:global LogForwardInclude [];
|
||||
:global LogForwardIncludeMessage [];
|
||||
:global LogForwardInclude "";
|
||||
:global LogForwardIncludeMessage "";
|
||||
#:global LogForwardInclude "account";
|
||||
#:global LogForwardIncludeMessage "message text";
|
||||
|
||||
|
|
|
|||
|
|
@ -12,8 +12,10 @@
|
|||
|
||||
:local ScriptName [ :jobname ];
|
||||
|
||||
# expected configuration version
|
||||
:global ExpectedConfigVersion 132;
|
||||
# Git commit id & info, expected configuration version
|
||||
:global CommitId "unknown";
|
||||
:global CommitInfo "unknown";
|
||||
:global ExpectedConfigVersion 135;
|
||||
|
||||
# global variables not to be changed by user
|
||||
:global GlobalFunctionsReady false;
|
||||
|
|
@ -53,6 +55,7 @@
|
|||
:global IsTimeSync;
|
||||
:global LogPrint;
|
||||
:global LogPrintOnce;
|
||||
:global LogPrintVerbose;
|
||||
:global MAX;
|
||||
:global MIN;
|
||||
:global MkDir;
|
||||
|
|
@ -63,6 +66,8 @@
|
|||
:global ProtocolStrip;
|
||||
:global RandomDelay;
|
||||
:global RequiredRouterOS;
|
||||
:global RmDir;
|
||||
:global RmFile;
|
||||
:global ScriptFromTerminal;
|
||||
:global ScriptInstallUpdate;
|
||||
:global ScriptLock;
|
||||
|
|
@ -147,6 +152,7 @@
|
|||
:global CleanName;
|
||||
:global FetchUserAgentStr;
|
||||
:global LogPrint;
|
||||
:global RmFile;
|
||||
:global WaitForFile;
|
||||
|
||||
$LogPrint info $0 ("Downloading and importing certificate with " . \
|
||||
|
|
@ -170,7 +176,7 @@
|
|||
dst-path=$FileName as-value;
|
||||
$WaitForFile $FileName;
|
||||
:if ([ /file/get $FileName size ] = 0) do={
|
||||
/file/remove $FileName;
|
||||
$RmFile $FileName;
|
||||
:error false;
|
||||
}
|
||||
} on-error={
|
||||
|
|
@ -181,7 +187,7 @@
|
|||
|
||||
/certificate/import file-name=$FileName passphrase="" as-value;
|
||||
:delay 1s;
|
||||
/file/remove [ find where name=$FileName ];
|
||||
$RmFile $FileName;
|
||||
|
||||
:if ([ :len [ /certificate/find where common-name=$CommonName ] ] = 0) do={
|
||||
/certificate/remove [ find where name~("^" . $FileName . "_[0-9]+\$") ];
|
||||
|
|
@ -281,6 +287,8 @@
|
|||
|
||||
# get readable device info
|
||||
:set DeviceInfo do={
|
||||
:global CommitId;
|
||||
:global CommitInfo;
|
||||
:global ExpectedConfigVersion;
|
||||
:global Identity;
|
||||
|
||||
|
|
@ -302,16 +310,19 @@
|
|||
([ $FormatLine "Location" ($Snmp->"location") ] . "\n") ] . \
|
||||
[ $IfThenElse ([ :len ($Snmp->"contact") ] > 0) \
|
||||
([ $FormatLine "Contact" ($Snmp->"contact") ] . "\n") ] . \
|
||||
[ $FormatLine "Board name" ($Resource->"board-name") ] . "\n" . \
|
||||
[ $FormatLine "Architecture" ($Resource->"architecture-name") ] . "\n" . \
|
||||
"Hardware:\n" . \
|
||||
[ $FormatLine " Board" ($Resource->"board-name") ] . "\n" . \
|
||||
[ $FormatLine " Arch" ($Resource->"architecture-name") ] . "\n" . \
|
||||
[ $IfThenElse ($RouterBoard->"routerboard" = true) \
|
||||
([ $FormatLine "Model" ($RouterBoard->"model") ] . \
|
||||
([ $FormatLine " Model" ($RouterBoard->"model") ] . \
|
||||
[ $IfThenElse ([ :len ($RouterBoard->"revision") ] > 0) \
|
||||
(" " . $RouterBoard->"revision") ] . "\n" . \
|
||||
[ $FormatLine "Serial number" ($RouterBoard->"serial-number") ] . "\n") ] . \
|
||||
[ $IfThenElse ([ :len ($License->"level") ] > 0) \
|
||||
([ $FormatLine "License" ($License->"level") ] . "\n") ] . \
|
||||
[ $FormatLine " Serial" ($RouterBoard->"serial-number") ] . "\n") ] . \
|
||||
[ $IfThenElse ([ :len ($License->"nlevel") ] > 0) \
|
||||
([ $FormatLine " License" ("level " . ($License->"nlevel")) ] . "\n") ] . \
|
||||
"RouterOS:\n" . \
|
||||
[ $IfThenElse ([ :len ($License->"level") ] > 0) \
|
||||
([ $FormatLine " License" ("level " . ($License->"level")) ] . "\n") ] . \
|
||||
[ $FormatLine " Channel" ($Update->"channel") ] . "\n" . \
|
||||
[ $FormatLine " Installed" ($Update->"installed-version") ] . "\n" . \
|
||||
[ $IfThenElse ([ :typeof ($Update->"latest-version") ] != "nothing" && \
|
||||
|
|
@ -321,6 +332,8 @@
|
|||
$RouterBoard->"current-firmware" != $RouterBoard->"upgrade-firmware") \
|
||||
([ $FormatLine " Firmware" ($RouterBoard->"current-firmware") ] . "\n") ] . \
|
||||
"RouterOS-Scripts:\n" . \
|
||||
[ $IfThenElse ($CommitId != "unknown") \
|
||||
([ $FormatLine " Commit" ($CommitInfo . "/" . [ :pick $CommitId 0 8 ]) ] . "\n") ] . \
|
||||
[ $FormatLine " Version" $ExpectedConfigVersion ]);
|
||||
}
|
||||
|
||||
|
|
@ -340,6 +353,7 @@
|
|||
:global CleanFilePath;
|
||||
:global LogPrint;
|
||||
:global MkDir;
|
||||
:global RmFile;
|
||||
:global WaitForFile;
|
||||
|
||||
:if ([ :len $PkgName ] = 0) do={ :return false; }
|
||||
|
|
@ -383,7 +397,7 @@
|
|||
$LogPrint debug $0 ("Downloading package file failed.");
|
||||
}
|
||||
|
||||
/file/remove [ find where name=$PkgDest ];
|
||||
$RmFile $PkgDest;
|
||||
:set Retry ($Retry - 1);
|
||||
}
|
||||
|
||||
|
|
@ -453,6 +467,8 @@
|
|||
:global IfThenElse;
|
||||
:global LogPrint;
|
||||
:global MkDir;
|
||||
:global RmDir;
|
||||
:global RmFile;
|
||||
:global WaitForFile;
|
||||
|
||||
:set CheckCert [ $IfThenElse ($CheckCert = "false") "no" "yes-without-crl" ];
|
||||
|
|
@ -469,10 +485,10 @@
|
|||
http-header-field=({ [ $FetchUserAgentStr $ScriptName ] }) as-value;
|
||||
} on-error={
|
||||
:if ([ $WaitForFile $FileName 500ms ] = true) do={
|
||||
/file/remove $FileName;
|
||||
$RmFile $FileName;
|
||||
}
|
||||
$LogPrint debug $0 ("Failed downloading from: " . $Url);
|
||||
/file/remove $DirName;
|
||||
$RmDir $DirName;
|
||||
:return false;
|
||||
}
|
||||
$WaitForFile $FileName;
|
||||
|
|
@ -488,7 +504,7 @@
|
|||
:delay 100ms;
|
||||
}
|
||||
}
|
||||
/file/remove $DirName;
|
||||
$RmDir $DirName;
|
||||
:return $Return;
|
||||
}
|
||||
|
||||
|
|
@ -833,6 +849,9 @@
|
|||
:return true;
|
||||
}
|
||||
|
||||
# The function $LogPrintVerbose is declared, but has no code, intentionally.
|
||||
# https://rsc.eworm.de/DEBUG.md#verbose-output
|
||||
|
||||
# get max value
|
||||
:set MAX do={
|
||||
:if ($1 > $2) do={ :return $1; }
|
||||
|
|
@ -851,6 +870,7 @@
|
|||
|
||||
:global CleanFilePath;
|
||||
:global LogPrint;
|
||||
:global RmDir;
|
||||
:global WaitForFile;
|
||||
|
||||
:local MkTmpfs do={
|
||||
|
|
@ -867,7 +887,7 @@
|
|||
}
|
||||
|
||||
$LogPrint info $0 ("Creating disk of type tmpfs.");
|
||||
/file/remove [ find where name="tmpfs" type="directory" ];
|
||||
$RmDir "tmpfs";
|
||||
:do {
|
||||
/disk/add slot=tmpfs type=tmpfs tmpfs-max-size=([ /system/resource/get total-memory ] / 3);
|
||||
$WaitForFile "tmpfs";
|
||||
|
|
@ -884,7 +904,10 @@
|
|||
:return true;
|
||||
}
|
||||
|
||||
$LogPrint debug $0 ("Making directory: " . $Path);
|
||||
|
||||
:if ([ :len [ /file/find where name=$Path type="directory" ] ] = 1) do={
|
||||
$LogPrint debug $0 ("... which already exists.");
|
||||
:return true;
|
||||
}
|
||||
|
||||
|
|
@ -1004,6 +1027,62 @@
|
|||
:return true;
|
||||
}
|
||||
|
||||
# remove directory
|
||||
:set RmDir do={
|
||||
:local DirName [ :tostr $1 ];
|
||||
|
||||
:global LogPrint;
|
||||
|
||||
$LogPrint debug $0 ("Removing directory: ". $DirName);
|
||||
|
||||
:if ([ :len [ /file/find where name=$DirName type!=directory ] ] > 0) do={
|
||||
$LogPrint error $0 ("Directory '" . $DirName . "' is not a directory.");
|
||||
:return false;
|
||||
}
|
||||
|
||||
:local Dir [ /file/find where name=$DirName type=directory ];
|
||||
:if ([ :len $Dir ] = 0) do={
|
||||
$LogPrint debug $0 ("... which does not exist.");
|
||||
:return true;
|
||||
}
|
||||
|
||||
:do {
|
||||
/file/remove $Dir;
|
||||
} on-error={
|
||||
$LogPrint error $0 ("Removing directory '" . $DirName . "' (" . $Dir . ") failed.");
|
||||
:return false;
|
||||
}
|
||||
:return true;
|
||||
}
|
||||
|
||||
# remove file
|
||||
:set RmFile do={
|
||||
:local FileName [ :tostr $1 ];
|
||||
|
||||
:global LogPrint;
|
||||
|
||||
$LogPrint debug $0 ("Removing file: ". $FileName);
|
||||
|
||||
:if ([ :len [ /file/find where name=$FileName (type=directory or type=disk) ] ] > 0) do={
|
||||
$LogPrint error $0 ("File '" . $FileName . "' is not a file.");
|
||||
:return false;
|
||||
}
|
||||
|
||||
:local File [ /file/find where name=$FileName !(type=directory or type=disk) ];
|
||||
:if ([ :len $File ] = 0) do={
|
||||
$LogPrint debug $0 ("... which does not exist.");
|
||||
:return true;
|
||||
}
|
||||
|
||||
:do {
|
||||
/file/remove $File;
|
||||
} on-error={
|
||||
$LogPrint error $0 ("Removing file '" . $FileName . "' (" . $File . ") failed.");
|
||||
:return false;
|
||||
}
|
||||
:return true;
|
||||
}
|
||||
|
||||
# check if script is run from terminal
|
||||
:set ScriptFromTerminal do={
|
||||
:local Script [ :tostr $1 ];
|
||||
|
|
@ -1035,6 +1114,8 @@
|
|||
:local Scripts [ :toarray $1 ];
|
||||
:local NewComment [ :tostr $2 ];
|
||||
|
||||
:global CommitId;
|
||||
:global CommitInfo;
|
||||
:global ExpectedConfigVersion;
|
||||
:global Identity;
|
||||
:global IDonate;
|
||||
|
|
@ -1067,11 +1148,20 @@
|
|||
}
|
||||
}
|
||||
|
||||
:local CommitIdBefore $CommitId;
|
||||
:local ExpectedConfigVersionBefore $ExpectedConfigVersion;
|
||||
:local ReloadGlobalFunctions false;
|
||||
:local ReloadGlobalConfig false;
|
||||
:local DeviceMode [ /system/device-mode/get ];
|
||||
|
||||
:local CheckSums ({});
|
||||
:do {
|
||||
:local Url ($ScriptUpdatesBaseUrl . "checksums.json" . $ScriptUpdatesUrlSuffix);
|
||||
$LogPrint debug $0 ("Fetching checksums from url: " . $Url);
|
||||
:set CheckSums [ :deserialize from=json ([ /tool/fetch check-certificate=yes-without-crl \
|
||||
http-header-field=({ [ $FetchUserAgentStr $0 ] }) $Url output=user as-value ]->"data") ];
|
||||
} on-error={ }
|
||||
|
||||
:foreach Script in=[ /system/script/find where source~"^#!rsc by RouterOS\r?\n" ] do={
|
||||
:local ScriptVal [ /system/script/get $Script ];
|
||||
:local ScriptInfo [ $ParseKeyValueStore ($ScriptVal->"comment") ];
|
||||
|
|
@ -1085,7 +1175,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
:if (!($ScriptInfo->"ignore" = true)) do={
|
||||
:do {
|
||||
:if ($ScriptInfo->"ignore" = true) do={
|
||||
$LogPrint debug $0 ("Ignoring script '" . $ScriptVal->"name" . "', as requested.");
|
||||
:error true;
|
||||
}
|
||||
|
||||
:local CheckSum ($CheckSums->($ScriptVal->"name"));
|
||||
:if ([ :len ($ScriptInfo->"base-url") ] = 0 && [ :len ($ScriptInfo->"url-suffix") ] = 0 && \
|
||||
[ :convert transform=md5 to=hex [ :tolf ($ScriptVal->"source") ] ] = $CheckSum) do={
|
||||
$LogPrint debug $0 ("Checksum for script '" . $ScriptVal->"name" . "' matches, ignoring.");
|
||||
:error true;
|
||||
}
|
||||
|
||||
:do {
|
||||
:local BaseUrl [ $EitherOr ($ScriptInfo->"base-url") $ScriptUpdatesBaseUrl ];
|
||||
:local UrlSuffix [ $EitherOr ($ScriptInfo->"url-suffix") $ScriptUpdatesUrlSuffix ];
|
||||
|
|
@ -1104,10 +1206,9 @@
|
|||
} else={
|
||||
$LogPrint warning $0 ("Failed fetching script '" . $ScriptVal->"name" . "'!");
|
||||
}
|
||||
:error false;
|
||||
}
|
||||
}
|
||||
|
||||
:do {
|
||||
:if ([ :len $SourceNew ] = 0) do={
|
||||
$LogPrint debug $0 ("No update for script '" . $ScriptVal->"name" . "'.");
|
||||
:error false;
|
||||
|
|
@ -1181,6 +1282,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
:if ($CommitId != "unknown" && $CommitIdBefore != $CommitId) do={
|
||||
$LogPrint info $0 ("Updated to commit: " . $CommitInfo . "/" . [ :pick $CommitId 0 8 ]);
|
||||
}
|
||||
|
||||
:if ($ExpectedConfigVersionBefore > $ExpectedConfigVersion) do={
|
||||
$LogPrint warning $0 ("The configuration version decreased from " . \
|
||||
$ExpectedConfigVersionBefore . " to " . $ExpectedConfigVersion . \
|
||||
|
|
@ -1616,7 +1721,17 @@
|
|||
:delay $Delay;
|
||||
:set I ($I + 1);
|
||||
}
|
||||
:return true;
|
||||
|
||||
:while ([ :len [ /file/find where name=$FileName ] ] > 0) do={
|
||||
:do {
|
||||
/file/get $FileName;
|
||||
:return true;
|
||||
} on-error={ }
|
||||
:delay $Delay;
|
||||
:set Delay ($Delay * 3 / 2);
|
||||
}
|
||||
|
||||
:return false;
|
||||
}
|
||||
|
||||
# wait to be fully connected (default route is reachable, time is sync, DNS resolves)
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2020-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# wait for global-functions to finish
|
||||
# https://rsc.eworm.de/doc/global-wait.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2018-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, fetch
|
||||
#
|
||||
# track gps data by sending json data to http server
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=80
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, hotspot
|
||||
#
|
||||
# manage and clean up private WPA passphrase after hotspot login
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=80
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, hotspot
|
||||
#
|
||||
# manage and clean up private WPA passphrase after hotspot login
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# provides: lease-script, order=80
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, hotspot
|
||||
#
|
||||
# manage and clean up private WPA passphrase after hotspot login
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, hotspot
|
||||
#
|
||||
# add private WPA passphrase after hotspot login
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, hotspot
|
||||
#
|
||||
# add private WPA passphrase after hotspot login
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2019-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, hotspot
|
||||
#
|
||||
# add private WPA passphrase after hotspot login
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2021-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
# requires device-mode, ipsec
|
||||
#
|
||||
# and add/remove/update DNS entries from IPSec mode-config
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# update firewall and dns settings on IPv6 prefix change
|
||||
# https://rsc.eworm.de/doc/ipv6-update.md
|
||||
|
|
@ -20,7 +20,9 @@
|
|||
:global ScriptLock;
|
||||
|
||||
:local NaAddress $"na-address";
|
||||
:local NaValid $"na-valid";
|
||||
:local PdPrefix $"pd-prefix";
|
||||
:local PdValid $"pd-valid";
|
||||
|
||||
:if ([ $ScriptLock $ScriptName ] = false) do={
|
||||
:set ExitOK true;
|
||||
|
|
@ -33,12 +35,18 @@
|
|||
:error false;
|
||||
}
|
||||
|
||||
:if ([ :typeof $PdPrefix ] = "nothing") do={
|
||||
:if ([ :typeof $PdPrefix ] = "nothing" || [ :typeof $PdValid ] = "nothing") do={
|
||||
$LogPrint error $ScriptName ("This script is supposed to run from ipv6 dhcp-client.");
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
}
|
||||
|
||||
:if ($PdValid != 1) do={
|
||||
$LogPrint info $ScriptName ("The prefix " . $PdPrefix . " is no longer valid. Ignoring.");
|
||||
:set ExitOK true;
|
||||
:error false;
|
||||
}
|
||||
|
||||
:local Pool [ /ipv6/pool/get [ find where prefix=$PdPrefix ] name ];
|
||||
:if ([ :len [ /ipv6/firewall/address-list/find where comment=("ipv6-pool-" . $Pool) ] ] = 0) do={
|
||||
/ipv6/firewall/address-list/add list=("ipv6-pool-" . $Pool) address=:: comment=("ipv6-pool-" . $Pool) dynamic=yes;
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2013-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# run scripts on DHCP lease
|
||||
# https://rsc.eworm.de/doc/lease-script.md
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
# Copyright (c) 2020-2025 Christian Hesse <mail@eworm.de>
|
||||
# https://rsc.eworm.de/COPYING.md
|
||||
#
|
||||
# requires RouterOS, version=7.14
|
||||
# requires RouterOS, version=7.15
|
||||
#
|
||||
# forward log messages via notification
|
||||
# https://rsc.eworm.de/doc/log-forward.md
|
||||
|
|
@ -57,6 +57,11 @@
|
|||
:local MessageVal;
|
||||
:local MessageDups ({});
|
||||
|
||||
:set LogForwardFilter [ $EitherOr $LogForwardFilter [] ];
|
||||
:set LogForwardFilterMessage [ $EitherOr $LogForwardFilterMessage [] ];
|
||||
:set LogForwardInclude [ $EitherOr $LogForwardInclude [] ];
|
||||
:set LogForwardIncludeMessage [ $EitherOr $LogForwardIncludeMessage [] ];
|
||||
|
||||
:local LogForwardFilterLogForwardingCached [ $EitherOr [ $LogForwardFilterLogForwarding ] ("\$^") ];
|
||||
:foreach Message in=[ /log/find where (!(message="") and \
|
||||
!(message~$LogForwardFilterLogForwardingCached) and \
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue