Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,21 @@ docstring gives: it is a record, not a claim about now.

## 2026-11-20

- **`trinity`'s `sshd` gets a keys-only step, and "no host firewall" is
written down as a decision.** The trinity audit of 2026-11-13 found `sshd`
taking passwords, with X11 forwarding on and 17 GitHub-imported keys
authorized; the build runbook never hardened it.
[`build-the-sensitive-tier-host.md`](runbooks/build-the-sensitive-tier-host.md)
§3 now writes `10-trinity.conf`, the same four lines as `alexander`'s and
`phoenix`'s, keeps `authorized_keys` to `prometheus` and Hicks, and proves
both halves. A new `security.md` row records why `trinity` does not follow
`phoenix`'s `ufw` policy (ADR-0117): Docker's rules run ahead of `ufw`'s for
`443` and `53`, so a policy would cover `22` alone, and the spare firewall is
better without one. The step is not yet applied on the host. The same audit
found two prose slips, fixed here: `hardware.md` read ADR-0107's UPS
subscription as present tense, and `converge-the-host.md` counted ten deploy
gauges where `converge.sh` writes eleven.

- **A Hitron CODA56 is bought to replace the rented XB7**
([#1594](https://github.com/Gerrrt/HomeLab/issues/1594)). Three of the
XB7's Ethernet ports have sent `em0` corrupted frames in three weeks; see
Expand Down
7 changes: 4 additions & 3 deletions docs/hardware.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,10 @@ move, `trinity`, `gandalf` and the console are on the PDU too, and `smaug` is on
it directly rather than by the long cord to the media room it had until
2026-11-06.
[ADR-0107](adr/0107-subscribe-trinity-to-the-ups-and-bound-saruman-s-guest-stop.md)
makes `trinity` a third host that halts on the signal. `gandalf`, the console
and the KVM do not. That subscription is the runbook's step 4b, and it is
not built yet.
decides that `trinity` becomes a third host that halts on the signal. That
subscription is the runbook's step 4b, and it is not built yet, so today
`trinity` stops uncleanly when the pack empties. `gandalf`, the console and
the KVM are left to the pack by decision.

Off-rack: only the eero Pro 6E units, distributed through the house.
Both laptops ride a mains cut out on their own cells, so each cell is a
Expand Down
56 changes: 56 additions & 0 deletions docs/runbooks/build-the-sensitive-tier-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,62 @@ Expect:
Anything else stops the build here. A disabled Secure Boot makes §4's seal
meaningless, and a missing TPM makes it impossible.

**SSH: keys only.** The installer's OpenSSH takes passwords, and cloud-init's
`50-cloud-init.conf` drop-in can keep it that way. The audit of 2026-11-13
found `trinity` answering `publickey,password`, with X11 forwarding on and 17
keys imported from GitHub in `authorized_keys`. Your account here is in
`sudo`, `docker` and `lxd`, so a guessed password is root on the host that
holds the household's data. `trinity` has no host firewall by decision
([`security.md`](../security.md)), so this drop-in is the control on `22`.

Keep `~/.ssh/authorized_keys` to the machines you administer it from:
`prometheus`'s key, put there by `ssh-copy-id` above, and Hicks's. Install
Hicks's now, from Hicks, while a password still works:

```bash
ssh-copy-id <you>@10.0.99.40
```

Delete every other line in the file, including any `gh:` import. Before
going further, prove a fresh key login from each machine; run this on
`prometheus` and on Hicks, and both must succeed with no password prompt:

```bash
ssh -o ControlPath=none -o PreferredAuthentications=publickey -o PasswordAuthentication=no <you>@10.0.99.40 true
```

If either fails, fix that machine's key first: the next step takes away the
password it would otherwise fall back on. Then log in with a key and keep that
session open while you do the rest, so a mistake cannot lock you out:

```bash
sudo tee /etc/ssh/sshd_config.d/10-trinity.conf > /dev/null <<'EOF'
# Keys only (build-the-sensitive-tier-host.md §3). Sorts ahead of
# 50-cloud-init.conf, and sshd keeps the first value it reads, so these win.
PasswordAuthentication no
KbdInteractiveAuthentication no
PermitRootLogin no
X11Forwarding no
EOF
sudo sshd -t && sudo systemctl reload ssh
sudo sshd -T | grep -E '^(passwordauthentication|kbdinteractiveauthentication|permitrootlogin|x11forwarding) '
```

All four read `no`. Then, from `prometheus`, in a new terminal, prove both
halves. `ControlPath=none` makes each probe open a fresh connection instead
of riding on the session you kept open:

```bash
ssh -o ControlPath=none -o PubkeyAuthentication=no -o PreferredAuthentications=password <you>@10.0.99.40 true
```

```bash
ssh -o ControlPath=none -o PreferredAuthentications=publickey -o PasswordAuthentication=no <you>@10.0.99.40 true
```

The first must fail with `Permission denied (publickey)`, and the second must
succeed. Run the second from Hicks too.

**Tell networkd to leave the other two interfaces alone.** 26.04's dracut
leaves a catch-all, `zzzz-dracut-default.network`, that runs DHCP on every
interface netplan does not name. That is the I226 (`enp1s0`) and the Wi-Fi
Expand Down
2 changes: 1 addition & 1 deletion docs/runbooks/converge-the-host.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ What differs from the monitoring host, and why:

## What it records

Ten gauges in `/var/lib/node_exporter/textfile_collector/homelab-deploy.prom`,
Eleven gauges in `/var/lib/node_exporter/textfile_collector/homelab-deploy.prom`,
written on every exit path including the refusals, so a run that declined to
move still reports what the host is on.

Expand Down
1 change: 1 addition & 0 deletions docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ What this network is actually built to survive:
| Someone on the lab segment reaching `eden`'s SSH | **Key-only, unfenced, and accepted.** `eden` holds the map of the weak domain's attack paths, and its `sshd` answers all of VLAN 30, the six domain guests included: the guest runs with `firewall=0` and no host firewall, and nothing in this repository fences `sshd` on any Linux lab guest. What bounds it is the key. `sshd` refuses passwords, and `garnet` takes two keys, the operator's and `phoenix`'s, which `tofu/` installs; `root`'s copies are command-restricted by cloud-init. `garnet`'s sudo is `NOPASSWD`, from the default user Proxmox's cloud-init makes on every Linux guest `tofu/` builds, and is accepted with it: on `eden` `garnet` is in the `docker` group, which is root already. A fence by source address, as the domain's six have for `phoenix`, would be its own decision for every Linux guest, not `eden`'s alone |
| Someone on the lab segment reaching the lab's Grafana or BloodHound, or a detonation reaching `diabolos`'s UIs | **Scoped by address, as the SOC's are.** `alexander`'s Grafana (`3000`) is published by the lab stack's `caddy`, and `eden`'s BloodHound (`8443`) by the bloodhound stack's own `caddy`; each answers Hicks's `10.0.50.0/24` and refuses the rest of VLAN 30, the six domain guests included. `diabolos`, not yet built, has soc's fence for its dashboard and GUI. Until then Grafana and BloodHound answered all of VLAN 30, where BloodHound's graph is the domain's attack-path map ([#1428](https://github.com/Gerrrt/HomeLab/issues/1428)). The residuals are the SOC row's: Hicks is a whole /24, and an address on VLAN 30 can be spoofed for a one-way packet but not for the TLS session the UIs need |
| A range target with a path out | It has none — `gandalf`'s targets sit on a bridge with no physical port, on `172.30.30.0/24`, which the firewall does not route and on which nothing has a default route at all ([ADR-0014](adr/0014-put-ifrit-on-imaginationlan-and-give-the-targets-no-route.md), [ADR-0017](adr/0017-buy-ifrit-for-iops-and-keep-the-range-disposable.md)) |
| Someone on Winterfell or Hicks logging in to `trinity` | **Open until the runbook's `sshd` step is applied; no host firewall by decision.** `trinity` holds the household's data and the sensitive tier's age key, and its `sshd` answers Hicks (by [ADR-0031](adr/0031-narrow-hicks-to-a-named-list-on-winterfell-and-leave-the-lab-open.md)'s list) and every host on VLAN 99, between which pfSense never filters. [`build-the-sensitive-tier-host.md`](runbooks/build-the-sensitive-tier-host.md) §3 now makes `sshd` key-only through a drop-in that outranks cloud-init's, refuses root and X11 forwarding, and keeps `authorized_keys` to `prometheus`'s key and Hicks's. The audit of 2026-11-13 found it taking passwords, with X11 forwarding on and 17 keys imported from GitHub, and that is still the host's state: the step was written on 2026-11-20 and has not been applied. Until it is, a guessed password is root. `ufw` is installed and stays disabled, unlike `phoenix`'s ([ADR-0117](adr/0117-give-phoenix-a-key-only-sshd-and-a-default-deny-inbound-policy.md)): the other two ports `trinity` answers, `443` and `53`, are published by Docker, whose rules run ahead of `ufw`'s, so a policy would govern `22` alone, which the drop-in closes once applied. Nothing routes through `trinity`, and as the spare firewall a host policy is one more thing to get in the way the day it stands in for `morpheus`. What reaches `443` and `53` is set by pfSense and by the stack's bind addresses |
| Someone with the trusted Wi-Fi key quietly joining | Kea's lease log reaches Loki; `UnknownDeviceOnTrustedSegment` fires the first time a MAC appears on VLAN 50 in seven days ([ADR-0019](adr/0019-read-device-joins-from-the-dhcp-server.md)) |
| Losing visibility of a failure | 183 alert rules, 30 days of metrics and logs |
| Someone on a reachable VLAN silencing an alert to hide a failure | Alertmanager binds to `127.0.0.1`; silences go through authenticated Grafana |
Expand Down
2 changes: 1 addition & 1 deletion stacks/observability/prometheus/rules/deploy.rules.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# what got deployed, so `make up` on an uncommitted tree and `make up` on `main`
# were indistinguishable; and nothing compared the host to the repository, so a
# config edited in place stayed edited until a deploy silently overwrote it.
# scripts/converge.sh now runs hourly and writes ten gauges into the same
# scripts/converge.sh now runs hourly and writes eleven gauges into the same
# textfile directory the maintenance jobs use.
#
# TWO HOSTS PULL. prometheus converges the observability stack as robo, from
Expand Down