From 873caf60339744f319bf1be93d4b040d198bbe59 Mon Sep 17 00:00:00 2001 From: Garrett Allen <98648590+Gerrrt@users.noreply.github.com> Date: Mon, 23 Nov 2026 20:43:13 +0000 Subject: [PATCH 1/2] docs(network): record neo's narrowed management, TLS 1.2 api-ssl, IPv6 off and parked ports The switch's own filter, services and admin user now admit the switch LAN and desktop-02 only, with SNMP and Home Assistant's api-ssl as named rules. api-ssl takes TLS 1.2 only, IPv6 is disabled, and unused ports are off. Applied on neo on 2026-11-23 from the 2026-11-13 audit. Co-Authored-By: Claude Opus 5.5 --- docs/changelog.md | 9 +++++++++ docs/network.md | 20 +++++++++++++++---- .../connect-the-switch-to-home-assistant.md | 7 ++++++- docs/security.md | 3 ++- 4 files changed, 33 insertions(+), 6 deletions(-) diff --git a/docs/changelog.md b/docs/changelog.md index cd1f666c8..12cbcc0f6 100644 --- a/docs/changelog.md +++ b/docs/changelog.md @@ -19,6 +19,15 @@ docstring gives: it is a record, not a claim about now. ## 2026-11-23 +- **`neo`'s remaining audit findings, applied.** From the 2026-11-13 audit: + the switch's own input filter and its `ssh`, `winbox` and `www-ssl` + services, and the admin user's address, are narrowed from all of + `10.0.99.0/24` to the switch LAN and desktop-02, with SNMP from + `prometheus` and `api-ssl` from `trinity` as named rules of their own. + `api-ssl` takes TLS 1.2 only, IPv6 is disabled on the switch, and the + unused ports are disabled. Applied under a five-minute automatic revert, + cancelled once SSH, the SNMP scrape and a fresh TLS 1.2 handshake from + `trinity` were proven. device-mode, which needs a button press, is not done. - **The monitoring host's weekly prune also removes anonymous volumes that no container uses.** The 2026-11-13 audit of `prometheus` found 69 of them, and there were 99 by today, left behind by validation and scratch runs. diff --git a/docs/network.md b/docs/network.md index 81ddafe23..099c948a7 100644 --- a/docs/network.md +++ b/docs/network.md @@ -163,7 +163,8 @@ truth for what a box actually does. 2026-11-11.** [ADR-0111](adr/0111-read-the-switch-from-home-assistant-over-api-ssl.md) turned `api-ssl` on at `8729` for Home Assistant on `trinity` alone, with - the same leaf as the UI and `available-from=10.0.99.40/32`. The user is + the same leaf as the UI, `tls-version=only-1.2` since 2026-11-23, and + `available-from=10.0.99.40/32`. The user is `homeassistant`, in a group with `read,api,test` and nothing else, and it is also limited to `10.0.99.40`. Plain `api` is off. The integration does not verify the certificate, and ADR-0111 records why that is @@ -176,9 +177,20 @@ truth for what a box actually does. PVID 7, and tagged to the bridge's own interface, which admits tagged frames only. The number is arbitrary. Any VID unused elsewhere works, but port 1's PVID and the management interface must agree. - - The switch has its own small input filter that accepts management from a - named address list and drops the rest. The morpheus rules above are the - outer gate, and this is the inner one. + - The switch has its own input filter, narrowed on 2026-11-23 to the same + sources the morpheus rules above admit. It accepts replies and ICMP, + admin from the address list `mgmt` (`10.7.7.0/24` and desktop-02 at + `10.0.50.90`), SNMP from `10.0.99.20` and `api-ssl` from `10.0.99.40`, + and drops the rest. `ssh`, `winbox` and `www-ssl` are available from the + same two `mgmt` entries, and so is the admin user `gerrrt`. The morpheus + rules are the outer gate, and this is the inner one. From `prometheus`, + SSH reaches the switch only jumped through morpheus + (`ssh -J admin@10.0.99.1 gerrrt@10.7.7.2`), which arrives from + `10.7.7.1`. + - IPv6 is disabled on the switch (`disable-ipv6=yes`), so it has no + address of either kind, link-local included. + - Every port with nothing plugged in is disabled, so a cable pushed into a + spare port joins no VLAN until someone enables it. - Neighbour discovery (LLDP, CDP, MNDP) and MAC-WinBox are limited to the switch-LAN interface; MAC-Telnet is off. MAC-WinBox is how you reach the switch by MAC after a reset, as diff --git a/docs/runbooks/connect-the-switch-to-home-assistant.md b/docs/runbooks/connect-the-switch-to-home-assistant.md index 45094c468..af814b0e8 100644 --- a/docs/runbooks/connect-the-switch-to-home-assistant.md +++ b/docs/runbooks/connect-the-switch-to-home-assistant.md @@ -102,10 +102,15 @@ Turn `api-ssl` on with the leaf `www-ssl` already serves, for `trinity` only. Plain `api` stays off: ```text -/ip/service/set api-ssl certificate=neo.matrix.elysium available-from=10.0.99.40/32 disabled=no +/ip/service/set api-ssl certificate=neo.matrix.elysium available-from=10.0.99.40/32 tls-version=only-1.2 disabled=no +/ip/firewall/filter/add chain=input action=accept protocol=tcp dst-port=8729 src-address=10.0.99.40 comment="Home Assistant api-ssl" place-before=[find comment="everything else"] /ip/service/print where name~"api" ``` +The filter rule is needed because the switch's own input filter admits only +the sources [`network.md`](../network.md) lists, and drops the rest before +the service's `available-from` is ever consulted. + `api` reads `X` (disabled), and `api-ssl` reads port `8729`, the certificate and `10.0.99.40/32` under *AVAILABLE-FROM*. RouterOS 7 renamed the service's `address` to `available-from`; the old keyword still works diff --git a/docs/security.md b/docs/security.md index bd53b7e5f..e4699237b 100644 --- a/docs/security.md +++ b/docs/security.md @@ -288,7 +288,8 @@ other way, CasaBonita, ImaginationLAN, Skids and Degens each carry paired `inet`/`inet6` blocks toward the six VLAN macros and neither toward the switch LAN, so their IPv6 catch-all reaches it. Both are latent rather than live for the same reason — `igc0` has only a link-local address, which does not route — -and both are divergences from the pattern rather than paths anything can use +and on the far side `neo` has IPv6 disabled since 2026-11-23, so the switch +LAN holds no v6 address of the switch's to reach. Both are divergences from the pattern rather than paths anything can use today. Whether IPv6 is carried inside at all was settled when [#353](https://github.com/Gerrrt/HomeLab/issues/353) closed: pfSense does not carry it, as the paragraph headed *pfSense terminates IPv6 at the WAN* From 865fa13fd613955945770585bfbfd8c6571f6f7f Mon Sep 17 00:00:00 2001 From: Garrett Allen <98648590+Gerrrt@users.noreply.github.com> Date: Mon, 23 Nov 2026 20:58:36 +0000 Subject: [PATCH 2/2] =?UTF-8?q?docs(runbooks):=20admit=20trinity=20in=20ne?= =?UTF-8?q?o's=20input=20filter=20before=20=C2=A71's=20probe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The probe from trinity is dropped by the switch's own filter until the rule exists, so it timed out even with the pfSense pass correct. The rule now goes in §1, beside the pass, and §3 only turns the service on. Co-Authored-By: Claude Opus 5.5 --- .../connect-the-switch-to-home-assistant.md | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/docs/runbooks/connect-the-switch-to-home-assistant.md b/docs/runbooks/connect-the-switch-to-home-assistant.md index af814b0e8..8f18d215b 100644 --- a/docs/runbooks/connect-the-switch-to-home-assistant.md +++ b/docs/runbooks/connect-the-switch-to-home-assistant.md @@ -48,7 +48,18 @@ order in the running set from the firewall's shell: pfctl -sr | grep -n -e 'Allow HA API to LAN Switch' -e 'Block access to the untagged LAN' ``` -The pass's line number is the smaller one. Nothing listens on `8729` yet, +The pass's line number is the smaller one. + +The switch has its own input filter, and it admits only the sources +[`network.md`](../network.md) lists. Admit `trinity` there too, from a +terminal on the switch (`ssh -J admin@10.0.99.1 gerrrt@10.7.7.2`, or WinBox's +terminal): + +```text +/ip/firewall/filter/add chain=input action=accept protocol=tcp dst-port=8729 src-address=10.0.99.40 comment="Home Assistant api-ssl" place-before=[find comment="everything else"] +``` + +Nothing listens on `8729` yet, so from `trinity` a connection should now be refused by the switch. If it times out instead, the switch has an input filter dropping it, or the pass is missing. Look at the firewall's log for the block before you assume the @@ -103,14 +114,9 @@ Plain `api` stays off: ```text /ip/service/set api-ssl certificate=neo.matrix.elysium available-from=10.0.99.40/32 tls-version=only-1.2 disabled=no -/ip/firewall/filter/add chain=input action=accept protocol=tcp dst-port=8729 src-address=10.0.99.40 comment="Home Assistant api-ssl" place-before=[find comment="everything else"] /ip/service/print where name~"api" ``` -The filter rule is needed because the switch's own input filter admits only -the sources [`network.md`](../network.md) lists, and drops the rest before -the service's `available-from` is ever consulted. - `api` reads `X` (disabled), and `api-ssl` reads port `8729`, the certificate and `10.0.99.40/32` under *AVAILABLE-FROM*. RouterOS 7 renamed the service's `address` to `available-from`; the old keyword still works