Commit graph

2540 commits

Author SHA1 Message Date
Christian Hesse
2b758b83fd mod/inspectvar: use :tocrlf 2024-07-16 13:50:22 +02:00
Christian Hesse
2fd0d27447 global-functions: $Unix2Dos: use :tocrlf 2024-07-16 13:50:22 +02:00
Christian Hesse
8f75d542f3 global-functions: $PrettyPrint: use :tocrlf 2024-07-16 13:50:22 +02:00
Christian Hesse
8074305b92 global-functions: $Dos2Unix: use :tolf 2024-07-16 13:50:22 +02:00
Christian Hesse
f2ca62aed0 global-functions: $ScriptInstallUpdate: support storing with CRLF
Adding this in `global-config-overlay` make the scripts being stored
with CRLF line breaks:

    :global ScriptUpdatesCRLF true;

Handle with care, I do not recommend it. Thus it's just a hidden
setting.
2024-07-16 13:50:22 +02:00
Christian Hesse
a26f78329a ppp-on-up: support scripts with CRLF line breaks 2024-07-16 13:50:22 +02:00
Christian Hesse
ee928605df news-and-changes: support scripts with CRLF line breaks 2024-07-16 13:50:22 +02:00
Christian Hesse
7cf0c5b205 capsman-download-packages: support scripts with CRLF line breaks 2024-07-16 13:50:22 +02:00
Christian Hesse
68f61ae622 global-functions: $ScriptInstallUpdate: allow CRLF on device 2024-07-16 13:50:22 +02:00
Christian Hesse
2d42fed621 global-functions: $ScriptInstallUpdate: forcibly convert to LF...
... to make sure we do not have unintended CRLF line breaks.
2024-07-16 13:50:22 +02:00
Christian Hesse
0101b56bff README: use :tocrlf to convert global-config-overlay 2024-07-16 13:50:22 +02:00
Christian Hesse
f09fa83105 doc/mod/ssh-keys-import: drop hint on older RouterOS 2024-07-16 13:49:54 +02:00
Christian Hesse
3fd1896ad6 capsman-download-packages: support running several scripts...
... as it is possible to have more than just one providing
the functionality.
2024-07-11 08:57:09 +02:00
Christian Hesse
78dfc568c1 capsman-{download-packages,rolling-upgrade}: run matching script
It is possible to run old and new CAPsMAN on one system simultaneously
(... since RouterOS 7.13?). Thus it may make sense to have both variants
of these scripts installed, and we have to make sure to run the correct
one.
2024-07-11 08:45:53 +02:00
Christian Hesse
35d3c058b8 update list of contributors 2024-07-10 11:02:53 +02:00
Christian Hesse
25135b64e5 backup-partition: check that target is inactive 2024-07-08 10:05:11 +02:00
Christian Hesse
235737c232 backup-partition: check the fallback partition actually exists...
... and use its id for actions.
2024-07-08 10:04:57 +02:00
Christian Hesse
1bc6f9c45c backup-partition: rename variable 2024-07-05 15:19:11 +02:00
Christian Hesse
64bc9f73f7 packages-update: run backups before package download
This reduces memory pressure, especially on device with very limited RAM
like mAP with its 64 MB.
2024-07-04 15:31:43 +02:00
Christian Hesse
eab9b28cd2 global-functions: $MkDir: enable tmpfs if disabled 2024-07-04 15:31:43 +02:00
Christian Hesse
ce1b635eb2 global-functions: $GetMacVendor: cert 'GTS Root R4' 2024-07-02 21:29:14 +02:00
Christian Hesse
f3f7d3edc0 check-certificates: limit scope for $CertNew...
... into block where certificate is replaced.

This should unbreak renewing with a certificate updated in place.
2024-06-25 07:58:10 +02:00
Christian Hesse
cdb553d39b global-functions: $CertificateDownload: try fallback to mkcert.org
There's a nice API that allows to download certificate by exact common
name. Let's use that, as a fallback at least.

https://mkcert.org/
2024-06-21 16:04:05 +02:00
Christian Hesse
b35c7b6703 Merge branch 'root-certificates' into next 2024-06-21 15:57:04 +02:00
Christian Hesse
1a6812ef79 notify on changes regarding certificates 2024-06-21 15:57:04 +02:00
Christian Hesse
c4e8d01de1 certs: DigiCert TLS Hybrid ECC SHA384 2020 CA1 -> DigiCert Global Root CA
This is used by Cloudflare DNS Quard9 (9.9.9.9).

$CertificateAvailable "DigiCert Global Root CA";
/ip/dns/set use-doh-server=https://9.9.9.9/dns-query verify-doh-cert=yes;
2024-06-21 15:57:04 +02:00
Christian Hesse
a05efdc07f certs: DigiCert Global G2 TLS RSA SHA256 2020 CA1 -> DigiCert Global Root G2
This is used by Cloudflare DNS (1.1.1.1).

$CertificateAvailable "DigiCert Global Root G2";
/ip/dns/set use-doh-server=https://1.1.1.1/dns-query verify-doh-cert=yes;
2024-06-21 15:57:04 +02:00
Christian Hesse
588dacb5af certs: Go Daddy Secure Certificate Authority - G2 -> Go Daddy Root Certificate Authority - G2 2024-06-21 15:57:04 +02:00
Christian Hesse
0ae3d31c58 certs: GTS CA 1C3 / GTS CA 1P5 -> GTS Root R1 2024-06-21 15:57:04 +02:00
Christian Hesse
a744508d4f certs: Starfield Secure Certificate Authority - G2 -> Starfield Root Certificate Authority - G2 2024-06-21 15:57:04 +02:00
Christian Hesse
7553870f2a certs: Cloudflare Inc ECC CA-3 -> Baltimore CyberTrust Root 2024-06-21 15:57:04 +02:00
Christian Hesse
944e125ef9 certs: Certum Domain Validation CA SHA2 -> Certum Trusted Network CA 2024-06-21 15:57:04 +02:00
Christian Hesse
b875d64724 certs: GlobalSign Atlas R3 DV TLS CA 2022 Q3 -> GlobalSign 2024-06-21 15:57:04 +02:00
Christian Hesse
3f51ebc125 certs: R3 / R10 -> ISRG Root X1 2024-06-21 15:57:04 +02:00
Christian Hesse
d1693a241b certs: E1 / E5 -> ISRG Root X2
In the beginning of Let's Encrypt their root certificate ISRG Root X1
was not widely trusted, at least some older and/or mobile platforms were
missing that certificate in their root certificate store.
At that time Let's Encrypt was using an alternative chain of trust,
where a certificate was cross-signed with DST Root CA X3.

To make sure a valid chain of trust is available under all circumstances
a set of all certificates had to be supplied: both root vertificates
ISRG Root X1 & DST Root CA X3, and an intermediate certificate.
This was still true after DST Root CA X3 expired, as it could still be
used as a root anchor and was shipped by Let's Encrypt when requested. 🤪

This time is finally over, and we have a clean chain for trust ending in
ISRG Root X1 (or ISRG Root X2).
Well, actually it is the other way round... Let's Encrypt signs with
different tantamount intermediate certificates. There is not only E5, but
also E6 - and we can not know beforehand which one is used on renew.

So let's jetzt drop the intermediate certificates now, and rely on root
certificates only. We are perfectly fine with this these days.

Follow-up commits will do the same for *all* certificates.

The certificate is downloaded with:

    curl -d '["ISRG Root X2"]' https://mkcert.org/generate/ | grep -v '^$' > certs/ISRG-Root-X2.pem
2024-06-21 15:55:45 +02:00
Christian Hesse
35f4ec0b1d doc/mod/notification-matrix: drop certificate hint...
... as matrix.org switched to Let's Encrypt with ISRG Root X2.
2024-06-20 10:45:03 +02:00
Christian Hesse
76dd069fa6 Let's Encrypt changed their intermediate certificates
https://letsencrypt.org/2024/03/19/new-intermediate-certificates
https://letsencrypt.org/certificates/

But let's keep the old ones around for now, as some sites are still
using the old intermediate.
2024-06-19 09:29:23 +02:00
Christian Hesse
d01362dbaa unattended-lte-firmware-upgrade: check on valid version first 2024-06-11 21:14:05 +02:00
Christian Hesse
1e1c9be945 unattended-lte-firmware-upgrade: drop the AT reset
The AT command to reset is specific to modem. So this worked for some
only... Let's just drop it, and update the log message.
2024-06-11 21:09:06 +02:00
Christian Hesse
2166f262c8 unattended-lte-firmware-upgrade: omit just another once 2024-06-11 21:07:17 +02:00
Christian Hesse
9c899f871d backup-cloud: remove trailing spaces
How did I produce these!? 😳
2024-06-10 18:11:37 +02:00
netravnen
c2dd9de9b1 unattended-lte-firmware-upgrade: omit once
Omit `once` from the `/interface/lte/firmware-upgrade` command to make
sure it does acutally return a valid result.

Fixes #69
2024-06-10 12:20:24 +02:00
netravnen
0a085e6610 check-lte-firmware-upgrade: omit once
Omit `once` from the `/interface/lte/firmware-upgrade` command to make
sure it does acutally return a valid result.
2024-06-10 12:20:24 +02:00
Christian Hesse
cd4ac2c088 backup-cloud: log note on previous connection errors 2024-06-05 15:05:43 +02:00
Christian Hesse
e35ba4b06c global-functions: $CleanName: no exception for dash...
... as we still want to deduplicate it when it is inside the input
string. This also unbreak certificate import for "Go Daddy Secure
Certificate Authority - G2" (and more)...
2024-06-01 23:06:24 +02:00
Christian Hesse
a97820d12a telegram-chat: drop extra parenthesis 2024-05-25 19:55:13 +02:00
Christian Hesse
d664856326 telegram-chat: convert the message (command) to string
RouterOS 7.15beta4 fixed a bug in JSON parser:

*) console - do not convert string to array in ":deserialize" command;

Before that change commands with a comma caused very crazy issues. Let's
convert the message to a string. This does not give exactly the expected
result, but mitigates telegram-chat to explode.

A command like...

    /ip/address/print proplist=address,network;

... is converted to...

    /ip/address/print proplist=address;network;

... and results in:

    Columns: ADDRESS
    # ADDRESS
    0 10.0.0.1/24
    1 127.0.0.1/8
    bad command name network (line 1 column 36)
2024-05-24 20:30:55 +02:00
Christian Hesse
96ea39b7cd Merge branch 'backup-partition' into next 2024-05-23 12:52:33 +02:00
Christian Hesse
33a495beb7 backup-partition: news on support for copy-over 2024-05-23 12:27:23 +02:00
Christian Hesse
0a46fb536f doc/backup-upload: fix link for backup-partition 2024-05-23 12:11:41 +02:00