diff --git a/docs/changelog.md b/docs/changelog.md index 65671c15..e260329d 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. - **#922 closed: the 2000/250 plan stays, and the WAN moves off `em0` through `neo`'s SFP+ cages at 2.5G ([ADR-0131](adr/0131-carry-the-wan-through-neos-sfp-cages-at-2-5g.md)).** diff --git a/docs/network.md b/docs/network.md index 57e3ae45..28480dbc 100644 --- a/docs/network.md +++ b/docs/network.md @@ -167,7 +167,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 @@ -180,9 +181,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 45094c46..8f18d215 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 @@ -102,7 +113,7 @@ 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/service/print where name~"api" ``` diff --git a/docs/security.md b/docs/security.md index bd53b7e5..e4699237 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*