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
20 changes: 20 additions & 0 deletions docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,26 @@ docstring gives: it is a record, not a claim about now.

## 2026-11-24

- **`gandalf` is now monitored ([#1651](https://github.com/Gerrrt/HomeLab/issues/1651),
[ADR-0126](adr/0126-monitor-gandalf-now-that-it-stays-on.md)).** ADR-0125 keeps
the range host on, so ADR-0017's reason for giving it no monitoring — off
between sessions — is gone. `gandalf` now runs `Saruman`'s Grafana Alloy agent
in metrics-only mode: node metrics and two host collectors push to `prometheus`
Comment thread
Gerrrt marked this conversation as resolved.
Resolved
over `morpheus`'s ingest proxy on one host-scoped bearer token, and no logs
leave the range host (its journal can carry the attacker's segment, so
`deploy-agent.sh --metrics-only` ships `config.alloy` without `logs.alloy`). The
`pve-firewall-state` and new `range-state` collectors record the host firewall,
the `vmbr1_host_in` ingress table, `vmbr0`/`sshd` forwarding, and the
`homelab-ragnarok-stop.timer`'s state and deadline — the barriers
`build-the-playground.md` §7's per-session read-back checked by hand.
`range.rules.yaml` adds seven alerts over them. Built and deployed across
#1676, #1679, #1682, #1685 and #1693; verified live on 2026-11-23 — 0 push
failures and the `range_scope` tables enforcing with 0 out-of-scope packets.
The §4 tooling removal on `gandalf` was applied the same day: the
GitHub-capable root SSH key (`/root/.ssh/id_rsa`) and the `.claude` footprint
were removed and verified gone, with nothing on the host or in the repo using
or re-provisioning the key, so the host now matches §4's *Nothing else on
`gandalf`*.
- **`UpsOnBattery` now pages on a short transfer.** On 2026-11-21 the UPS
ran on battery for 82 seconds, for distorted input, and nothing paged. The
rule was `upsSecondsOnBattery > 0` for 30 seconds, which needs two scrapes in
Expand Down
9 changes: 0 additions & 9 deletions docs/roadmap.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,15 +40,6 @@ What an entry here may contain:

Closes when it is empty.

- **[#1651](https://github.com/Gerrrt/HomeLab/issues/1651) Monitor
`gandalf` now that it stays on.** Decided by
[ADR-0126](adr/0126-monitor-gandalf-now-that-it-stays-on.md): `gandalf` gets
`Saruman`'s agent, pushing hypervisor state to `prometheus` over one
host-scoped pass, with alerts for the host firewall off, `ragnarok` run past
the timer, and the SSD and updates. No gate. Left: the collector install,
the `morpheus` pass and the rules. Until it lands, the host firewall on an
always-on range host is checked only by `build-the-playground.md` §7's
read-back.
- **[#1226](https://github.com/Gerrrt/HomeLab/issues/1226) The HomePods in
Home Assistant, for control.** Decided by
[ADR-0099](adr/0099-control-the-homepods-from-home-assistant-and-leave-their-audio-out.md).
Expand Down
43 changes: 23 additions & 20 deletions docs/runbooks/build-the-playground.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,11 +125,11 @@ Never set it up: power it off from the setup screen (Shift+F10, then
`lspci` afterwards should list the I219 alone.
- **VT-x and VT-d on**, and *Configuration Change Detection* off.
- **After Power Loss: Power Off.** `gandalf` stays on
([ADR-0125](../adr/0125-keep-gandalf-on-and-stop-ragnarok-on-a-timer.md)),
but nothing watches it yet
([#1651](https://github.com/Gerrrt/HomeLab/issues/1651)), so a power cut
must not bring it back by itself where nobody knows it is up. After a cut,
it starts at the power button. ADR-0125 reopens this with #1651.
([ADR-0125](../adr/0125-keep-gandalf-on-and-stop-ragnarok-on-a-timer.md)) and
is monitored now
([ADR-0126](../adr/0126-monitor-gandalf-now-that-it-stays-on.md), [#1651](https://github.com/Gerrrt/HomeLab/issues/1651)).
It is still set to stay down after a power cut, so it is up only when someone
powers it on; after a cut, it starts at the power button.
- Secure Boot can stay on, because the Proxmox VE 9 installer is signed.

Install Proxmox VE **onto the 256 GB M.2, not the SATA SSD**
Expand Down Expand Up @@ -532,7 +532,7 @@ run they record:
| The `local_network` alias | `10.0.30.20` | `10.0.30.30` |
| Guest NICs | 140 and 170, by the loop | **None yet**: the node is empty. Clear the flag on each NIC as §5 and §6 create it. `tpl-kali` and its clones carry `firewall=0` from Packer, but a NIC added in the GUI, such as the attack VM's `net1`, defaults to on |
| The probe from `morpheus` | `10.0.30.20 8006` | `10.0.30.30 8006` |
| Telemetry, the collector and the alert drill | All three | **None of them.** ADR-0017 gives `gandalf` no agent, so nothing reads the collector's file and the three alerts cannot see it. The check that it stays on is §7's read-back at every power-on |
| Telemetry, the collector and the alert drill | All three | **All three now**, added by *Monitoring the host* below ([ADR-0126](../adr/0126-monitor-gandalf-now-that-it-stays-on.md), [#1651](https://github.com/Gerrrt/HomeLab/issues/1651)), which supersedes ADR-0017's no-agent: `gandalf` runs its own metrics-only agent, so the collector's file is read and the alerts see it. §7's read-back at every power-on stays as the per-session backstop |

> [!CAUTION]
> **Enable with a permissive policy first, then flip it.** `pve-firewall
Expand Down Expand Up @@ -678,8 +678,9 @@ up{instance="Saruman"}
reads as a failure when nothing is wrong. Both jobs, `Saruman-metrics` and
`Saruman-alloy`, should be at `1`.

**Then that it stays on**, on `Saruman` only: `gandalf` has no agent, and §7
is its check. The probe above is a thing a person does once, and
**Then that it stays on**: on `Saruman` here, and on `gandalf` through its own
agent since *Monitoring the host* ([ADR-0126](../adr/0126-monitor-gandalf-now-that-it-stays-on.md)), with §7's read-back as its
backstop. The probe above is a thing a person does once, and
the ordinary ways the firewall goes off again — a `pve-firewall stop` while
debugging a guest, an upgrade rewriting `/etc/pve/firewall`, a rebuild that
skips this section — page nothing on their own. Install the collector that
Expand Down Expand Up @@ -714,9 +715,10 @@ has never fired is a rule nobody knows can.
The firewall above lets `22` in from Hicks alone. Behind it, Proxmox's
installer leaves `sshd` taking root's password: `PermitRootLogin yes` in
`/etc/ssh/sshd_config`, and Debian's `PasswordAuthentication` default of
`yes`. On `gandalf` nothing watches whether the firewall is on (§7), so if it
ever goes off, the root password is all that stands between VLAN 30, where the
attack VM is, and a root shell on the range's isolation host. Keys only takes
`yes`. On `gandalf` the firewall is watched now ([ADR-0126](../adr/0126-monitor-gandalf-now-that-it-stays-on.md)), but an alert is
not a barrier: if it ever goes off, the root password would be all that stands
between VLAN 30, where the attack VM is, and a root shell on the range's
isolation host. Keys only takes
that away. An audit on 2026-11-13 found both still on.

Root's password stays set. The `root@pam` login on `8006` uses it, and so does
Expand Down Expand Up @@ -810,7 +812,8 @@ enable them first, or the mount will fail.
### Nothing else on `gandalf`

`gandalf` is the box that keeps the attacker's segment away from the estate.
It shares layer 2 with `ragnarok`, and nothing watches it (ADR-0017). So it
It shares layer 2 with `ragnarok`. It is monitored now
([ADR-0126](../adr/0126-monitor-gandalf-now-that-it-stays-on.md) supersedes ADR-0017's no-agent), but the segment it shares is why it still
holds no estate credential, no GitHub login, no personal tooling and no apt
repository but Debian's and Proxmox's. Repository work and anything that needs
a login are done from a Hicks workstation or `phoenix`, never from a shell
Expand Down Expand Up @@ -1290,14 +1293,14 @@ start ragnarok → read the host back → revert every target to `clean` → wor
6 h after ragnarok started, or the last range-extend → stopped, by itself
```

Nothing watches the host yet
([#1651](https://github.com/Gerrrt/HomeLab/issues/1651)), so the read-back
below is the only check on it, once per session.
The host is monitored now
([ADR-0126](../adr/0126-monitor-gandalf-now-that-it-stays-on.md), [#1651](https://github.com/Gerrrt/HomeLab/issues/1651)), and the read-back
below is the per-session backstop on top of it.

**Read the firewall back before anything else.** The collector and the alerts
that keep `Saruman`'s firewall on do not reach `gandalf`, because ADR-0017 gives
it no agent. So the check §4 hands to Prometheus on `Saruman` is a step here,
once per session. `pve-firewall status` should read `enabled/running`, and §4's
**Read the firewall back before anything else.** `gandalf` runs its own
`pve-firewall-state` collector now ([ADR-0126](../adr/0126-monitor-gandalf-now-that-it-stays-on.md) supersedes ADR-0017's
no-agent), so the firewall is watched between sessions. The read-back here is
the belt-and-suspenders check, once per session. `pve-firewall status` should read `enabled/running`, and §4's
probe from `morpheus`, aimed at `10.0.30.30`, should give `8006 exit=1` and
`control exit=0`. `sshd -T | grep -E '^(permitrootlogin|passwordauthentication|x11forwarding|allowtcpforwarding) '`
should read `without-password` and three `no`s, because an upgrade that replaces
Expand Down Expand Up @@ -1430,7 +1433,7 @@ should say it is not running, and `range-extend 2` should refuse.
[ADR-0126](../adr/0126-monitor-gandalf-now-that-it-stays-on.md) gives it the
same Alloy agent `Saruman` has, reporting *hypervisor state* — the ADR-0028
class, not guest telemetry — to `prometheus`, with alerts for the faults this
section used to catch by hand. **Not yet deployed on `gandalf`.**
section used to catch by hand. **Deployed on 2026-11-23** ([#1651](https://github.com/Gerrrt/HomeLab/issues/1651)): the agent, the `morpheus` pass and the rules are live, metrics-only.

**First, the pass.** The agent pushes metrics to `10.0.99.20:9090`. On
`morpheus`, add a host-scoped pass `10.0.30.30 → 10.0.99.20` on `9090`,
Expand Down
2 changes: 1 addition & 1 deletion docs/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +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)) |
| A rooted range target reaching `gandalf` itself | **Dropped at `vmbr1`, before the host firewall, once applied.** The host has no address on the range bridge, but Linux answers ARP for its addresses on any interface and accepts a packet for them on any interface. So a target that adds an on-link route to `10.0.30.30` was reaching the host, and only the Proxmox firewall dropped it. Nothing watches that firewall on `gandalf`. A netdev `ingress` table on `vmbr1` now drops every frame the bridge passes up to the host, ARP included, without touching guest-to-guest traffic ([`build-the-playground.md`](runbooks/build-the-playground.md) §2, proved by §8 check four). Behind it, `gandalf` holds no estate credential, no GitHub login, no personal tooling and no third-party apt repository (§4, *Nothing else on `gandalf`*), so the host gives nothing beyond itself. The audits of 2026-11-13 and 2026-11-22 found credentials, then tooling and two third-party repositories. The credentials were gone by 2026-11-22. **The table and the tooling removal are not yet applied** |
| A rooted range target reaching `gandalf` itself | **Dropped at `vmbr1`, before the host firewall.** The host has no address on the range bridge, but Linux answers ARP for its addresses on any interface and accepts a packet for them on any interface. So a target that adds an on-link route to `10.0.30.30` was reaching the host, and only the Proxmox firewall dropped it. `gandalf`'s own `pve-firewall-state` collector watches that firewall now ([ADR-0126](adr/0126-monitor-gandalf-now-that-it-stays-on.md), [#1651](https://github.com/Gerrrt/HomeLab/issues/1651)). A netdev `ingress` table on `vmbr1` now drops every frame the bridge passes up to the host, ARP included, without touching guest-to-guest traffic ([`build-the-playground.md`](runbooks/build-the-playground.md) §2, proved by §8 check four). Behind it, `gandalf` holds no estate credential, no GitHub login, no personal tooling and no third-party apt repository (§4, *Nothing else on `gandalf`*), so the host gives nothing beyond itself. The audits of 2026-11-13 and 2026-11-22 found credentials, then tooling and two third-party repositories. The credentials were gone by 2026-11-22. **The table and the tooling removal are both applied, verified live on 2026-11-23: the `vmbr1` ingress table loads, and the GitHub-capable root SSH key and the `.claude` footprint were removed.** |
| Someone on Winterfell or Hicks logging in to `trinity` | **Key-only `sshd` since 2026-11-20; 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. The step was applied on 2026-11-20: a password-only login is refused with `Permission denied (publickey)`, and three keys remain, `prometheus`'s, Hicks's and the operator's laptop, the last kept by decision. Agent sessions run on `trinity` as the operator, by decision ([ADR-0123](adr/0123-keep-agent-sessions-on-trinity.md)). `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 already closes to anything without a key. 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 on Winterfell or Hicks logging in to `prometheus` | **Key-only `sshd` since 2026-11-23; no host firewall by decision.** `prometheus` holds the estate's CA key and the age key that opens every volume backup set, and converge runs as the operator, who is in `sudo` and `docker`. Its `sshd` answers all of Hicks (by `morpheus`'s pass for `22` to the segment) and every host on VLAN 99. The audit's root-only reads on 2026-11-23 found it taking passwords, with X11 forwarding on and `ufw` inactive. [ADR-0128](adr/0128-give-prometheus-a-key-only-sshd-and-no-host-firewall.md) makes `sshd` key-only through a drop-in that outranks cloud-init's, refusing root and X11 forwarding ([`restore-the-stack.md`](runbooks/restore-the-stack.md#make-sshd-key-only)). It adds no host firewall, because Docker's rules run ahead of `ufw`'s for the published ports, so a policy would cover `22` alone. Those ports stay fenced as before: by `morpheus` by destination, by the ingest proxy's tokens on `9090` and `3100`, and on `6514` by the syslog listener's pinned client certificate and its sender list. The step was applied the same day. `sshd -T` read `no` for all four settings, a password login and a keyboard-interactive login were each refused with `Permission denied (publickey)`, and a key login from Hicks succeeded after the reload. |
| 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)) |
Expand Down