mirror of
https://github.com/eworm-de/routeros-scripts.git
synced 2026-03-03 20:49:36 +00:00
Compare commits
84 commits
28971c1e88
...
181a559499
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
181a559499 | ||
|
|
e7cdfe3f32 | ||
|
|
2d2bc87237 | ||
|
|
0be3d7c67d | ||
|
|
52c166b4bf | ||
|
|
811973cecf | ||
|
|
510e196d21 | ||
|
|
297d679b81 | ||
|
|
d033097115 | ||
|
|
f351341909 | ||
|
|
bb65be7feb | ||
|
|
f145461ad0 | ||
|
|
77e80125be | ||
|
|
b462fa7f3b | ||
|
|
a5fe3a3c9d | ||
|
|
24d6933e59 | ||
|
|
1f1c4a22b6 | ||
|
|
b52ac03dbb | ||
|
|
b8fa446f82 | ||
|
|
c7448103e4 | ||
|
|
350a825250 | ||
|
|
42a964ba45 | ||
|
|
c0712abe92 | ||
|
|
170d35b0ea | ||
|
|
3db31b694a | ||
|
|
a1ade72d6b | ||
|
|
6ee0747c6f | ||
|
|
3aac53c1e8 | ||
|
|
9450374649 | ||
|
|
b517b16b79 | ||
|
|
d7c832889d | ||
|
|
f57ab70bc8 | ||
|
|
3d2ad9e624 | ||
|
|
72528501c9 | ||
|
|
e6a80af041 | ||
|
|
6bf3bc6250 | ||
|
|
434b7509e4 | ||
|
|
ba3490f154 | ||
|
|
27a0c9f66b | ||
|
|
3f89ccc4db | ||
|
|
d8443529cc | ||
|
|
66c0259700 | ||
|
|
2b2772b899 | ||
|
|
9f1bd7b9d3 | ||
|
|
8ae7bd3a14 | ||
|
|
710f812896 | ||
|
|
e18a3ec915 | ||
|
|
eea24a785f | ||
|
|
9f9a43e9f6 | ||
|
|
70481f6321 | ||
|
|
dd56301c40 | ||
|
|
fd1950265a | ||
|
|
ee9a7512e0 | ||
|
|
36d6a4235a | ||
|
|
af75d95211 | ||
|
|
242c0080eb | ||
|
|
d48cd15541 | ||
|
|
eab3b731f5 | ||
|
|
01ee5ad80d | ||
|
|
3fa0f8192f | ||
|
|
a41f3a07f0 | ||
|
|
05a3764b1b | ||
|
|
7cffa69189 | ||
|
|
00c44276df | ||
|
|
c880274748 | ||
|
|
0522370dee | ||
|
|
680a47f6fe | ||
|
|
d4d7b23dbb | ||
|
|
c355745efb | ||
|
|
6b5610dcec | ||
|
|
9250d2dced | ||
|
|
2cba8f3617 | ||
|
|
bf1a54f677 | ||
|
|
5e7a6fe9cc | ||
|
|
6ca12aaa27 | ||
|
|
dfae818b80 | ||
|
|
66d1b8481d | ||
|
|
26a886856d | ||
|
|
9f1d6fdc89 | ||
|
|
f35055e24e | ||
|
|
b436e39db5 | ||
|
|
8f32d8e705 | ||
|
|
ab01fce80a | ||
|
|
af3a64c6a2 |
3 changed files with 34 additions and 7 deletions
|
|
@ -23,7 +23,8 @@ Run the complete base installation:
|
|||
:local CertFingerprint "e14ffcad5b0025731006caa43a121a22d8e9700f4fb9cf852f02a708aa5d5666";
|
||||
|
||||
:local CertSettings [ /certificate/settings/get ];
|
||||
:if (!((($CertSettings->"builtin-trust-store") ~ "fetch" || \
|
||||
:if (!((($CertSettings->"builtin-trust-anchors") = "trusted" || \
|
||||
($CertSettings->"builtin-trust-store") ~ "fetch" || \
|
||||
($CertSettings->"builtin-trust-store") = "all") && \
|
||||
[ :len [ /certificate/builtin/find where common-name=$CertCommonName ] ] > 0)) do={
|
||||
:put "Importing certificate...";
|
||||
|
|
|
|||
|
|
@ -100,11 +100,13 @@ including demonstration recorded live at [MUM Europe
|
|||
The update script does server certificate verification, so first step is to
|
||||
download the certificates.
|
||||
|
||||
> 💡️ **Hint**: RouterOS comes with a builtin certificate store. You
|
||||
> 💡️ **Hint**: RouterOS 7.19 comes with a builtin certificate store. You
|
||||
> can skip the steps regarding certificate download and import and jump
|
||||
> to [installation of scripts](#installation-of-scripts) if you set the
|
||||
> certificates to be trusted my the `fetch` command at least. But make
|
||||
> sure not to drop other targets:
|
||||
> trust for these builtin trust anchors:
|
||||
> `/certificate/settings/set builtin-trust-anchors=trusted;`
|
||||
> With RouterOS 7.21 the functionality was changed. Set this at minimum,
|
||||
> but make sure not to drop other targets:
|
||||
> `/certificate/settings/set builtin-trust-store=fetch;`
|
||||
|
||||
If you intend to download the scripts from a
|
||||
|
|
|
|||
|
|
@ -128,7 +128,8 @@
|
|||
}
|
||||
|
||||
:local CertSettings [ /certificate/settings/get ];
|
||||
:if ((($CertSettings->"builtin-trust-store") ~ $UseFor || \
|
||||
:if ((($CertSettings->"builtin-trust-anchors") = "trusted" || \
|
||||
($CertSettings->"builtin-trust-store") ~ $UseFor || \
|
||||
($CertSettings->"builtin-trust-store") = "all") && \
|
||||
[ :len [ /certificate/builtin/find where common-name=$CommonName ] ] > 0) do={
|
||||
:return true;
|
||||
|
|
@ -1014,9 +1015,32 @@
|
|||
|
||||
# return an IPv6 netmask for CIDR
|
||||
:set NetMask6 do={
|
||||
:local CIDR [ :tonum $1 ];
|
||||
:local FuncName $0;
|
||||
:local CIDR [ :tostr $1 ];
|
||||
|
||||
:return (((~::) << (128 - $CIDR)) & (~::));
|
||||
:global IfThenElse;
|
||||
:global MAX;
|
||||
:global MIN;
|
||||
|
||||
:global NetMask6Cache;
|
||||
|
||||
:if ([ :typeof ($NetMask6Cache->$CIDR) ] = "ip6") do={
|
||||
:return ($NetMask6Cache->$CIDR);
|
||||
}
|
||||
|
||||
:if ([ :typeof $NetMask6Cache ] = "nothing") do={
|
||||
:set NetMask6Cache ({});
|
||||
}
|
||||
|
||||
:local Mask "";
|
||||
:for I from=0 to=7 do={
|
||||
:set Mask ($Mask . \
|
||||
[ :convert from=num to=hex (0xffff - (0xffff >> [ :tonum [ $MIN [ $MAX ($CIDR - (16 * $I)) 0 ] 16 ] ])) ] . \
|
||||
[ $IfThenElse ($I < 7) ":" ]);
|
||||
}
|
||||
:set Mask [ :toip6 $Mask ];
|
||||
:set ($NetMask6Cache->$CIDR) $Mask;
|
||||
:return $Mask;
|
||||
}
|
||||
|
||||
# prepare NotificationFunctions array
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue