docs(rosenpass): commit the Link B host artifacts and the endpoint decision

Link B (rpi wg-remote 10.20.0.2 <-> linode wg0 10.20.0.1) is now under
Rosenpass too. The pieces that only existed on the hosts are committed
here with an install/diagnosis write-up, because all three are runtime
state someone will have to rebuild:

- rosenpass-upnp.{sh,service,timer} - re-assert the permanent UPnP mapping
  UDP 9999 -> 192.168.1.125 every 15 min (the router has no admin panel,
  and a dropped mapping is silent).
- linkb-rollback-{rpi,linode}.sh - the self-cancelling watchdogs; this link
  carries the only SSH path to the linode, so the rollback is local and
  staged on both ends before the far unit starts.
- linkb-verify.sh - hashes each end's PSK and compares them without
  printing key material.

Endpoint strategy recorded: the Pi's public address is residential DHCP
but provably static (IGD uptime since 2026-09-10, ~83 days on the
configured 137.118.156.124), so the linode config pins it and a moved
address is caught by the per-interface rotation-age series rather than by
a sync timer.
This commit is contained in:
Lance Walters 2026-12-03 02:46:10 -05:00
commit 5fc7cd4ead
7 changed files with 222 additions and 0 deletions

View file

@ -83,6 +83,59 @@ it after the `values.yaml` change is reconciled).
(age > 900 s for 10 m), both `severity: warning`, both with `absent()` guards
so a missing series alerts instead of reading as healthy.
`RosenpassPskRotationStalled` keys on `(node, interface)`, so it covers Link B
(`interface="wg-remote"`) as soon as that series exists — no rule change needed.
The `absent()` arms still name `wg0` only, so a *disappeared* `wg-remote` series
is currently silent; adding that arm plus a metric for the UPnP mapping below is
the remaining gap.
## Link B (rpi wg-remote ↔ linode wg0)
Link B is the second transport link: rpi `wg-remote` `10.20.0.2` ↔ linode `wg0`
`10.20.0.1`, the exchange on UDP 9999 across the public internet. Two facts make
it fragile in ways Link A is not:
- **The Pi's inbound path is a UPnP mapping**, because the home router has no
accessible admin panel. `rosenpass-upnp.sh` re-asserts
`UDP 9999 -> 192.168.1.125:9999 'rosenpass-pq'` with a permanent lease every
15 minutes, logs to `logger -t rosenpass-upnp` and exits non-zero when the
mapping cannot be restored. Install:
```sh
install -m 0755 rosenpass-upnp.sh /usr/local/sbin/
install -m 0644 rosenpass-upnp.service rosenpass-upnp.timer /etc/systemd/system/
systemctl daemon-reload && systemctl enable --now rosenpass-upnp.timer
upnpc -l | grep 9999 # 9999->192.168.1.125:9999, lease 0
```
- **The linode's peer block needs the Pi's public address, which is residential
DHCP.** Chosen strategy: a **documented static endpoint, no sync timer** —
proved from the router itself: `upnpc -s` reports the WAN connection
`Connected, uptime=…` with `Time started : Thu Sep 10 16:38:13 2026` and
`ExternalIPAddress = 137.118.156.124`, i.e. ~83 days on the address that is
configured, and three independent echo services agreed (2026-12-03). If the
address moves the exchange stops and the link keeps its last PSK — which is
what `rosenpass_psk_rotation_age_seconds{interface="wg-remote"}` catches.
Re-point by editing `endpoint = "<new-ip>:9999"` in the linode's
`/etc/rosenpass/config.toml` and `systemctl restart rosenpass` there (both
ends do not need restarting; the Pi dials `50.116.38.217:9999`).
Rollout order that cannot strand the far end: this link carries the only SSH path
to the linode, so `/root/rosenpass-linkb-rollback.sh`
(`linkb-rollback-rpi.sh`, `linkb-rollback-linode.sh`) is staged on **both** hosts
and armed as a transient `systemd-run --on-active=420s` timer *before* the
linode's unit starts, self-cancelling via `/run/rosenpass-linkb-ok`. It restores
the Pi's Link A-only `/etc/rosenpass/config.toml.pre-linkb` and the static
`PresharedKey`s from the untouched `/etc/wireguard/*.conf` with `wg syncconf`.
The Linode end is restored by `wg syncconf wg0` from its own conf, so the hub's
client peers keep working.
Verify both ends agree and the key rotates, without printing key material (run
as root on the Pi): `linkb-verify.sh` — it hashes each end's PSK, compares them,
and prints the Link A sentinel so a scoped rotation is distinguishable from an
interface-wide one. Expect a changed digest 180 s apart with `agree` on both
samples.
## Testing the rules without merging
`kustomize build monitoring/controllers/home` proves the rule renders; these two