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

@ -0,0 +1,25 @@
#!/bin/bash
# rosenpass-upnp.sh - re-assert the permanent UPnP mapping that gives the
# Linode a way back to Rosenpass on the Pi (UDP 9999 -> 192.168.1.125:9999).
#
# The home router's admin panel is inaccessible, so this mapping is the ONLY
# inbound path for the Rosenpass exchange on Link B (rpi wg-remote <->
# linode wg0). It is runtime state: a router reboot, a factory reset or a UPnP
# daemon hiccup drops it, and the failure is silent - the link keeps its last
# PSK and simply stops being post-quantum. Hence this timer.
#
# Idempotent: re-adding an identical permanent-lease mapping is a no-op, so it
# is safe to run on a schedule. Never prints key material (it handles none).
set -uo pipefail
LAN_IP=192.168.1.125
PORT=9999
DESC=rosenpass-pq
out=$(upnpc -e "$DESC" -a "$LAN_IP" "$PORT" "$PORT" UDP 0 2>&1) || true
# upnpc prints the mapping as " 0 UDP 9999->192.168.1.125:9999 'rosenpass-pq'"
if ! upnpc -l 2>/dev/null | grep -q "${PORT}->${LAN_IP}:${PORT}"; then
logger -t rosenpass-upnp "mapping missing after re-assert: ${out}"
exit 1
fi