diff --git a/docs/network.md b/docs/network.md index 6e85dcc4..93b7f22b 100644 --- a/docs/network.md +++ b/docs/network.md @@ -645,7 +645,9 @@ Televisions and consoles. Internet only. service, registered on `smaug` since its first boot and read as enabled on 2026-11-13. [ADR-0133](adr/0133-turn-truenas-connect-off-on-smaug.md) turns it off; [`build-the-nas.md`](runbooks/build-the-nas.md) §6.12 is - the procedure, and until that is done the registration stands. + the procedure, and until that is done the registration stands. **So do two + smaller vendor contacts**, TrueNAS's usage collection and Docker's + image-update check. Both are on, and §6.13 turns them off. - **Three rules from `trinity` to `mediatv`, in force since 2026-10-19:** `10.0.99.40 → 10.0.40.40`, passing `3001/tcp` for Home Assistant's LG webOS integration and `9/udp` for the magic packet that wakes the TV, and diff --git a/docs/runbooks/build-the-backup-guest.md b/docs/runbooks/build-the-backup-guest.md index 0d27dbed..adae0a19 100644 --- a/docs/runbooks/build-the-backup-guest.md +++ b/docs/runbooks/build-the-backup-guest.md @@ -166,6 +166,28 @@ the copy PBS cannot prune: a snapshot is read-only to an NFS client, so root on `Saruman` or on `golem` can delete backups from the datastore and not from the last fortnight of snapshots. +**The quota.** *Datasets → `erebor/pbs` → Edit → Quotas*: **4 TiB** for +this dataset and its children. That is the quota that counts the snapshots, +not the reference-only one. Without it the datastore can grow into the whole +of `erebor`, and fill the pool under the media library and `erebor/apps`. +With it, a runaway PBS fills its own 4 TiB first. `golem`'s `df` then +reports that 4 TiB as the share's size, so `HostDiskCritical` fires on the +mount at 10% free rather than at 10% of the pool. Because the quota counts +snapshots, space that garbage collection frees comes back only once the +snapshots holding it age out, up to fourteen days later. Leave room for +that: in November 2026 the dataset held about 1 TiB, about a quarter of the +quota. Read it from the console: + +```bash +zfs get -H -o value quota erebor/pbs +``` + +It prints `4T`, and on `golem`, `df -h /mnt/datastore/erebor` shows a size +of `4.0T`. + +> **Not yet done.** Decided 2026-11-24. The dataset had no quota from +> 2026-10-03 until then. + ## 4. The pass on `morpheus` One rule, on the **ImaginationLAN (30)** interface in the pfSense UI: diff --git a/docs/runbooks/build-the-nas.md b/docs/runbooks/build-the-nas.md index 35f9d947..3493ff6a 100644 --- a/docs/runbooks/build-the-nas.md +++ b/docs/runbooks/build-the-nas.md @@ -505,6 +505,15 @@ The boot disk is **not** part of this pool and must not be added to it. TrueNAS keeps its boot pool separate by design, which is the arrangement the S3520 in the optical bay exists for. +**The scrub is TrueNAS's default task, kept.** Creating the pool created it: +*Data Protection → Scrub Tasks*, `erebor`, Sundays at 00:00, threshold +**35 days**. The threshold means a Sunday run starts only when the last scrub +is at least 35 days old, so `erebor` is scrubbed about every five weeks, not +weekly. Read on 2026-11-24 with `midclt call pool.scrub.query`; the last +scrub before that finished on 2026-11-08. No Prometheus rule watches scrub +age, so a scrub that stops running shows only in TrueNAS's own alerts, the +gap [ADR-0133](../adr/0133-turn-truenas-connect-off-on-smaug.md) names. + ## §4 — Datasets > **Done 2026-09-18.** `erebor/media` on the **SMB** preset — case-insensitive @@ -2282,6 +2291,59 @@ or tests it. Prometheus is this host's paging path: `ZpoolVdevNotOnline`, > **Not yet done.** Decided 2026-11-13. +### §6.13 — Close the web UI, the announcements and the vendor checks + +The firewall keeps other segments off everything but the passes in +[`network.md`](../network.md). It cannot keep CasaBonita off, because the +televisions and consoles share `smaug`'s broadcast domain +([`security.md`](../security.md)). The read-only audit of 2026-11-13 found +the web UI on `0.0.0.0` with no allowlist and plain HTTP on `80` with no +redirect, and `smaug` announcing itself to the segment by NetBIOS (as +`truenas`), mDNS and WS-Discovery. Hicks mounts the share by address (§5), +because discovery does not cross segments, so those announcements reach only +the televisions and consoles. It also found two vendor contacts on: +TrueNAS's usage collection, and Docker's image-update check. The image pins +are digests and Dependabot tracks them in this repository, so the check can +only ever offer a hand-update that would drift from `compose.yaml`. With +§6.12 and this section done, ADR-0133's sentence holds: `smaug` starts no +connection but to its gateway's NUT server, its time and name servers, and +the registries its pulls come from. All of it was decided 2026-11-24. + +1. **Check the televisions first.** If a television opens the `media` share + over SMB, rather than playing through Jellyfin, point it at the address, + `smb://10.0.40.30/media` or `\\10.0.40.30\media`, and play one file + from it. After step 3 it can no longer find the share by browsing. +2. **The web UI.** *System → General Settings → GUI → Settings*: add + `10.0.50.0/24`, Hicks, to the allowed IP addresses, and turn on the HTTP + to HTTPS redirect. Save from a Hicks workstation, then reload the UI from + that workstation: it must still load. If the allowlist shuts the UI out, + undo it over SSH from `desktop-02`, which the allowlist does not govern: + `midclt call system.general.update '{"ui_allowlist": []}'`. +3. **The announcements.** *Network → Global Configuration → Service + Announcement*: clear **NetBIOS-NS**, **mDNS** and **WS-Discovery**. +4. **The vendor checks.** In the same GUI settings as step 2, clear + **Usage Collection**. In the Apps settings, turn off the check for Docker + image updates. +5. **Read it from the console shell:** + + ```bash + midclt call system.general.config | python3 -c 'import sys,json;d=json.load(sys.stdin);print(d["ui_allowlist"],d["ui_httpsredirect"],d["usage_collection"])' + midclt call network.configuration.config | python3 -c 'import sys,json;print(json.load(sys.stdin)["service_announcement"])' + midclt call docker.config | python3 -c 'import sys,json;print(json.load(sys.stdin)["enable_image_updates"])' + ``` + + They print `['10.0.50.0/24'] True False`, all three announcements + `False`, and `False`. +6. **The share and the services still answer.** From a Hicks workstation, + §5's `samwise` mount still opens, and Jellyfin, Navidrome and + Audiobookshelf still load. On the monitoring host, `up` for + `instance="smaug"` is still `1`. +7. **Record it here** with the date and the readings. Then turn + `security.md`'s CasaBonita paragraph, which names this section, into the + past tense in the same commit. + +> **Not yet done.** Decided 2026-11-24. + ## §7 — Verify > **As of 2026-09-19:** the monitoring-host line holds in both halves, the @@ -2374,7 +2436,9 @@ or tests it. Prometheus is this host's paging path: `ZpoolVdevNotOnline`, uid and gid 34, an NFSv4 share to `10.0.30.80` alone, and a daily snapshot task keeping fourteen. **Done 2026-10-03**: all three exist, and `golem` has made its datastore on the share - ([`build-the-backup-guest.md`](build-the-backup-guest.md)). + ([`build-the-backup-guest.md`](build-the-backup-guest.md)). **A 4 TiB quota + on it was decided 2026-11-24** and is not yet set. That runbook's §3 is the + step. - **Offsite** — owned, since 2026-09-20. §6.2 gets the media tier's state off `smaug`, onto the monitoring host and onto `oracle`, and every one of those copies is on the same shelf under the same roof — the position the volume diff --git a/docs/security.md b/docs/security.md index 0b1a6822..89364ade 100644 --- a/docs/security.md +++ b/docs/security.md @@ -519,6 +519,32 @@ unauthenticated ports the observability stack publishes. Audiobookshelf's `13378` is reachable the same way and is not the same residual: everything there but its health and status endpoints wants a login. +The same broadcast domain reaches everything else `smaug` listens on, and the +read-only audit of 2026-11-13 listed it. Each port, and what stands in its +place of a firewall rule: + +- **`22`**: `sshd` offers `publickey` alone, since 2026-11-24. +- **`80` and `443`**: the web UI, with no allowlist and no redirect until + [`build-the-nas.md`](runbooks/build-the-nas.md) §6.13 sets both. Then only + Hicks' addresses get the UI. The allowlist is a check on the source + address, but a television cannot complete a TCP connection while claiming + a Hicks address, because the replies route off the segment. +- **`139` and `445`**: the `media` share, behind an SMB login. The + televisions hold `bilbo`'s credential anyway. What it can do is + [ADR-0134](adr/0134-make-the-televisions-smb-user-read-only-on-the-media-share.md)'s + subject. +- **`111` and `2049`**: NFSv4, whose two exports name `10.0.30.20` and + `10.0.30.80`. A host on CasaBonita is neither, and cannot claim to be, for + the same reason as for the UI. +- **`4533`** is Navidrome, behind its own login, and **`8096`** is Jellyfin, + which the televisions are there to reach. +- **NetBIOS, mDNS and WS-Discovery** announce the host, its name `truenas` + and its share to the segment until §6.13 turns them off. + +Accepted while the televisions share the segment, and narrowed by §6.13. The +alternative is a segment of `smaug`'s own, which would put every television +stream through the firewall. + The row ADR-0008 wrote as `99 → 20` is narrower than it read: one host, `trinity`, to the Hue bridge on two ports and, since 2026-10-21, to the HomePods on ADR-0099's three rows, with every other device on Skids still