fix(networking): make the public gateway :8080 WireGuard-only (F2) #41
Loading…
Reference in a new issue
No description provided.
Delete branch "secops/internal-gw-8080"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Closes finding F2 of the 2026-11-27 cluster netsec audit.
gateway-system/publiclistens on0.0.0.0:8080(cilium-envoy, hostNetwork), andallowedRoutes.namespaces.from: Allmeans no hostname restriction. Theinternal_gwnft table already made8081/8084-8087WireGuard-only but did not list 8080, so the LAN could serve itself Forgejo and every public hostname over plain HTTP by spoofingHost:— bypassing Cloudflare TLS/WAF/rate limits and putting credentials on the wire inside192.168.1.0/24.None of that is needed: the only legitimate client is
cloudflaredon rpi, which connects to10.10.0.2:8080from10.10.0.1over the mesh.Changes
siriussec-internal-gw.nft— add8080to all three rules (lo,10.10.0.0/24+10.244.0.0/16, drop), with the reasoning in the header. This is the file already installed as/etc/nftables.d/internal-gw.nftand loaded byinternal-gw-firewall.service.internal-gw-firewall.service— Description now names 8080.rpi-ufw-internal-gw.sh— add 8080 so a futuregateway=truerelabel on the Pi cannot re-open the LAN path.README.md,docs/internal-wireguard-services.md— document that :8080 is WG-only and why.Verification (live, siriussec, 2026-11-27 ~05:15Z)
Both polarities, from two vantage points:
nft list table inet internal_gwnow showstcp dport { 8080, 8081, 8084, 8085, 8086, 8087 }on all three rules; accept counter at 2037 packets after the change (cloudflared), drop counter at 18 (the LAN probes). No regression on8081/8085: still DROP from the LAN, still 302/200 from the mesh.