Commit graph

3223 commits

Author SHA1 Message Date
Christian Hesse
e62a19257a fw-addr-lists: define certificate use 2025-11-11 23:01:34 +01:00
Christian Hesse
b6be7ded9a check-certificates: define certificate use 2025-11-11 23:01:34 +01:00
Christian Hesse
87f28c234f global-functions: $ScriptInstallUpdate: define certificate use 2025-11-11 23:01:34 +01:00
Christian Hesse
cf375cbdd1 global-functions: $GetMacVendor: define certificate use 2025-11-11 23:01:34 +01:00
Christian Hesse
0f1f9a467f global-functions: $DownloadPackage: define certificate use 2025-11-11 23:01:34 +01:00
Christian Hesse
daf1cfb381 global-functions: $CertificateAvailable: support new builtin-trust-store...
... which was introduced with RouterOS 7.21beta7.
2025-11-11 23:01:34 +01:00
Christian Hesse
f7e9f529d0 INITIAL-COMMANDS: support new builtin-trust-store...
... which was introduced with RouterOS 7.21beta7.
2025-11-11 23:01:34 +01:00
Christian Hesse
29a82d1a42 README: support new builtin-trust-store...
... which was introduced with RouterOS 7.21beta7.
2025-11-11 23:01:34 +01:00
Christian Hesse
b5f6881f3d README: add a line break before command 2025-11-11 23:01:34 +01:00
Christian Hesse
ba89aa229c fw-addr-lists.d/allow: use rsc.eworm.de in the list 2025-11-11 23:01:34 +01:00
Christian Hesse
7a8eecf555 fw-addr-lists.d/{allow,block}: use short url rsc.eworm.de 2025-11-11 23:01:34 +01:00
Christian Hesse
c25d276d0e Makefile: clean up and add phony targets 2025-11-11 23:01:34 +01:00
Christian Hesse
204977c685 global-functions: $ScriptInstallUpdate: extra actions on 'not found' only 2025-11-11 23:01:34 +01:00
Christian Hesse
a31f5559aa global-functions: $ScriptInstallUpdate: either or...
... but not both.
2025-11-11 23:01:34 +01:00
Christian Hesse
74f343f6d5 global-functions: $ScriptInstallUpdate: give hint on ignore
Fixes: https://github.com/eworm-de/routeros-scripts/issues/112
2025-11-11 23:01:34 +01:00
Christian Hesse
8a908be4e0 contrib/checksums.sh: output to stdout...
... and let the Makefile redirect.
2025-11-11 23:01:34 +01:00
Christian Hesse
735c163362 Merge branch 'contrib' into next 2025-11-11 23:01:34 +01:00
Christian Hesse
a0b4d422b5 contrib: introduce Makefile...
... and update references in links.
2025-11-11 23:01:34 +01:00
Christian Hesse
4de0b2e7be contrib/logo-color: place screenshots below each other...
... not side by side.
2025-11-11 23:01:34 +01:00
Christian Hesse
b20f025fc5 contrib/logo-color: use relative reference in link
... without extra path elements.

This may break, depending on site.
2025-11-11 23:01:34 +01:00
Christian Hesse
5c9825760f doc/mod/notification-telegram: use relative reference in link
This may break, depending on site.
2025-11-11 23:01:34 +01:00
Christian Hesse
42ad0d310f contrib/notification: format the values italic 2025-11-11 23:01:34 +01:00
Christian Hesse
2e1d59721f contrib/notification: update date format 2025-11-11 23:01:34 +01:00
Christian Hesse
de97ed6f19 contrib/{logo-color,notification}: add navigation structure 2025-11-11 23:01:34 +01:00
Christian Hesse
0f3df0c75d contrib/*: unify html code 2025-11-11 23:01:34 +01:00
Christian Hesse
668f29776b contrib/html.sh: drop comma & ampersand from id/anchor 2025-11-11 23:01:34 +01:00
Christian Hesse
c0e8ee8c9b contrib/html.sh: properly handle anchors 2025-11-11 23:01:34 +01:00
Christian Hesse
1b914274fd contrib/html.sh: link the logo with relative path 2025-11-11 23:01:34 +01:00
Christian Hesse
98343cf8fb contrib/html.sh: increase default line height 2025-11-11 23:01:34 +01:00
Christian Hesse
2aad3add26 contrib/html.sh: add a margin on left and right...
... for windows in landscape (wider than high). Also make the
notification float right for landscape only.
2025-11-11 23:01:34 +01:00
Christian Hesse
60a1b98866 contrib/html.sh: include stylesheet via link 2025-11-11 23:01:34 +01:00
Christian Hesse
7560020aff contrib/{logo-color,notification}: use a single style 2025-11-11 23:01:34 +01:00
Christian Hesse
ee06798d8b global-functions: $CertificateDownload: drop unused function 2025-11-10 12:16:22 +01:00
Christian Hesse
3776a028f8 check-certificates: add missing semicolon 2025-11-10 12:15:08 +01:00
Christian Hesse
c88953e44d README: fix typo
We had it there since 39d1027d697c09ec709a1b847a185ccff3b00540... 😜
2025-11-07 22:11:25 +01:00
Christian Hesse
20987221d9 mod/notification-email: ignore errors (for now...)
Errors are returned since RouterOS 7.21beta2.

We keep the current logic for now, as we want to support older
RouterOS versions. This is something to be reworked later...
2025-10-26 19:19:13 +01:00
Christian Hesse
ea4b5553c2 Merge branch 'netmask6' into next
This branch is a follow-up on 9ceed0926a
with clean solution. Read on for details...

The data type `ip6-prefix` used to hold what it was named for - an IPv6
prefix:

    [user@mikrotik] > :put 2001:db8::dead:beef/32
    2001:db8::/32

This changed with RouterOS 6.21beta2, which now allows that exact same
data type to hold something like "address with prefix length attached":

    [user@mikrotik] > :put 2001:db8::dead:beef/32
    2001:db8::dead:beef/32

My scripts (namely `fw-addr-lists`) relied on the old behaviour and broke.
The commit mentioned above was just a quick workaround, with rough edges,
and it could still fail.

Sadly RouterOS does not support bit shifting on IPv6 data types, so a
(completely) mathematical solution is out of scope.

This branch implements a new and better workaround, see the first commit
of branch (6ad6f9aa08) for details.

I opened a support ticket / feature request on this topic, let's see
what results it brings...

https://help.mikrotik.com/servicedesk/servicedesk/customer/portal/1/SUP-201881
2025-10-22 19:05:38 +02:00
Christian Hesse
b80b872e55 mod/ipcalc: support IPv6
Well, some of these values do not make a lot of sense for IPv6...
Something to be cleaned up later.
2025-10-19 19:55:12 +02:00
Christian Hesse
ea05b69f7c fw-addr-lists: use $NetMask6 2025-10-19 19:55:12 +02:00
Christian Hesse
d7a6eb1d00 global-functions: $NetMask6: implement simple caching
The calculation is quite complex for something that needs to be done
frequently, for example by `fw-addr-lists`. The number of possible
netmasks is limited, so let's cache the results that were calculated
already.
2025-10-19 19:52:42 +02:00
Christian Hesse
6ad6f9aa08 global-functions: introduce $NetMask6
RouterOS does not support bit shifting on IPv6 data types, so we have to
split the problem:

 * each 16 bit block is calculated separately, as number
 * the complete netmask is assembled in a loop, as string
 * the final string is casted to correct data type
2025-10-19 19:48:14 +02:00
Christian Hesse
c62f236251 Merge branch 'netmask4' into next 2025-10-19 19:26:51 +02:00
Christian Hesse
47309e5c03 fw-addr-lists: normalize IPv4 addresses 2025-10-16 15:43:43 +02:00
Christian Hesse
9fa11cb79a mod/ipcalc: use $NetMask4 2025-10-16 13:03:54 +02:00
Christian Hesse
def540c965 global-functions: introduce $NetMask4 2025-10-16 10:47:19 +02:00
Christian Hesse
025b492783 global-functions: remove trailing space 2025-10-16 10:34:09 +02:00
Christian Hesse
6630d35eea mod/notification-telegram: $FlushTelegramQueue: check for cert, again
Chances are that messages have been queued before system was fully up or
connected. Thus the certificate may be missing, and it should be checked
again for on flush.
2025-10-13 12:06:01 +02:00
Christian Hesse
c81618b571 log-forward: always use memo symbol...
... and add warning sign on top.
2025-10-09 09:22:39 +02:00
Christian Hesse
35b556f0b2 fw-addr-lists: calculate branch after post-processing...
... as branch will likely change, and we want to avoid duplicates. 😉
2025-10-08 18:43:06 +02:00
Christian Hesse
9ceed0926a fw-addr-lists: do not use IPv6 net addresses smaller /64
This should reduce the number of addresses in list by aggregating them,
and also fix addresses with host part set (like 2001:470:1:fb5::2a0/64,
which should be 2001:470:1:fb5::/64 really).

The latter caused new warnings with RouterOS 7.21beta2.
2025-10-08 18:43:06 +02:00