infra(garage): let cluster pods on rpi reach the S3 endpoint

The garage_guard nft table accepts 3900-3903 only from lo/wg0/wg-remote, so a
pod *scheduled on the Pi* is dropped: its traffic reaches 10.10.0.1 over the
Cilium veth, not wg0. Consequence: the Forgejo deploy runner (a pod on rpi) has
failed every deploy-site run at the Garage sync step with

  fatal error: Connect timeout on endpoint URL: "http://10.10.0.1:3900/..."

since the guard was installed (2026-11-19); the same S3 call from a pod on
another node works because that path arrives via wg0.

Accept the pod CIDR (10.244.0.0/16) as well — the cluster is the documented
consumer of this endpoint. LAN, tailscale and public sources still fall through
to the drop. Applied to rpi with host/install-garage-firewall.sh (persisted in
/etc/nftables.d/garage_guard.nft); verified from the deploy runner pod: the S3
API now answers 403 (unsigned) instead of timing out.
This commit is contained in:
Lance Walters 2026-11-27 01:01:28 -05:00
commit 6dda03a21f

View file

@ -34,6 +34,15 @@ table inet garage_guard {
# WireGuard only: the mesh hub link and loopback.
iifname { "lo", "wg0", "wg-remote" } tcp dport { 3900, 3901, 3902, 3903 } counter accept
# Cluster pods scheduled on this node. Traffic from a local pod
# reaches 10.10.0.1 over its Cilium veth, not wg0, so the rule above
# dropped it: the Forgejo deploy runner (a pod on rpi) timed out on
# `s3 cp ... http://10.10.0.1:3900` while the same call from a pod on
# another node worked (that path arrives via wg0). The cluster is the
# documented consumer of this endpoint, so accept its pod CIDR only —
# LAN, tailscale and public sources still fall through to the drop.
ip saddr 10.244.0.0/16 tcp dport { 3900, 3901, 3902, 3903 } counter accept
# Anything else — LAN, tailscale, public, or a future interface that
# nobody remembered to add above.
tcp dport { 3900, 3901, 3902, 3903 } counter drop