reachability: the S10 gate probes 80/443 only — passes with 53, 51820 and 3478 closed #328

Closed
opened 2026-08-07 17:32:46 +00:00 by ben · 2 comments
Owner

webPorts = []int{80, 443} (internal/reachability/prober.go:32) and the probe passes "the moment at least one answers" (:127-132).

A gateway needs more than that publicly reachable:

Port Who Consequence if closed but the gate is green
53 tcp+udp acme-dns, authoritative for the delegated zone (internal/clan/acmedns.go:108-109, listen = "0.0.0.0:53") certificate issuance and every 60-day renewal fail
51820/udp WireGuard, peers dial in (docs/architecture/03-fleet-topology.md:45) a node at another site has no mesh path
3478/udp + range coturn relay for NAT'd peers (:46) no fallback when direct dial fails
25/465/587/993 mail, once provisioned (ADR 0115) mail cannot receive

So founding can declare the gateway reachable, wire the name, and hand off — leaving a fleet whose certificates will fail at first renewal and whose remote nodes cannot join. For a single-site fleet the mesh forms over the LAN and this does not bite, which is likely why it has not been seen.

Note "at least one answers" is also weaker than it looks: a gateway serving 80 but not 443 passes.

Definition of done

The gate probes the ports the gateway actually needs for the configuration being stood up (mail ports only when mail is provisioned), and reports per-port results so the three troubleshooting lanes stay accurate. Worth confirming whether the current behaviour is a live gap for multi-site fleets before choosing the fix.


Found 2026-08-07 while scoping home-gateway reachability (dynamic address / automatic port opening / IPv6). Full trace in docs/research/2026-08-07-home-gateway-reachability-scope.md.

`webPorts = []int{80, 443}` (`internal/reachability/prober.go:32`) and the probe passes "the moment at least one answers" (`:127-132`). A gateway needs more than that publicly reachable: | Port | Who | Consequence if closed but the gate is green | |---|---|---| | 53 tcp+udp | acme-dns, authoritative for the delegated zone (`internal/clan/acmedns.go:108-109`, `listen = "0.0.0.0:53"`) | certificate issuance and every 60-day renewal fail | | 51820/udp | WireGuard, peers dial in (`docs/architecture/03-fleet-topology.md:45`) | a node at another site has no mesh path | | 3478/udp + range | coturn relay for NAT'd peers (`:46`) | no fallback when direct dial fails | | 25/465/587/993 | mail, once provisioned (ADR 0115) | mail cannot receive | So founding can declare the gateway reachable, wire the name, and hand off — leaving a fleet whose certificates will fail at first renewal and whose remote nodes cannot join. For a single-site fleet the mesh forms over the LAN and this does not bite, which is likely why it has not been seen. Note "at least one answers" is also weaker than it looks: a gateway serving 80 but not 443 passes. ## Definition of done The gate probes the ports the gateway actually needs for the configuration being stood up (mail ports only when mail is provisioned), and reports per-port results so the three troubleshooting lanes stay accurate. Worth confirming whether the current behaviour is a live gap for multi-site fleets before choosing the fix. --- Found 2026-08-07 while scoping home-gateway reachability (dynamic address / automatic port opening / IPv6). Full trace in `docs/research/2026-08-07-home-gateway-reachability-scope.md`.
Author
Owner

This was generated by AI during triage.

Verified: webPorts = []int{80, 443} confirmed as the only ports probed, and confirmed the pass condition is "at least one of these answers" (an early return once len(open) > 0). Confirmed acme-dns's public listener is on port 53, WireGuard on 51820/udp and coturn on 3478/udp per the architecture doc, and mail ports per ADR 0115 — none of these are probed anywhere in the reachability package. Claim holds.

Agent Brief

Category: bug
Summary: The public reachability gate should probe the ports the configuration being stood up actually needs, not just 80/443, and report per-port results.

Current behavior:
The outside-in reachability probe checks only ports 80 and 443, and passes as soon as one of the two answers. It never checks DNS (53), WireGuard (51820/udp), the TURN relay (3478/udp), or mail ports — so a gateway can pass the gate and hand off with, e.g., 443 open but 80 closed, or with DNS/mesh/mail unreachable. For a single-site, non-mail fleet this doesn't currently bite (the mesh forms over the LAN), which is likely why it hasn't been noticed.

Desired behavior:
The gate probes the set of ports relevant to the configuration being stood up — both web ports always, DNS when acme-dns is part of the setup, mail ports when mail is provisioned — and reports which specific ports are open/filtered/refused, rather than collapsing to a single pass/fail bit, so the existing three troubleshooting lanes (ports/firewall/CGNAT) stay accurate per port rather than for an aggregate result.

Key interfaces:

  • The prober's fixed port list becomes a set computed from what's being provisioned, rather than a hardcoded two-port constant.
  • The pass condition changes from "at least one of N answers" to something that reflects each individually-relevant port's state — at minimum, both web ports should each be checked rather than either being sufficient.
  • The result type already distinguishes open/filtered/refused per port internally for the two web ports; extend that per-port reporting to the fuller set instead of collapsing it.

Acceptance criteria:

  • A gateway with 80 open but 443 closed no longer silently passes as if both were fine — the per-port state is visible in the result.
  • When mail is being provisioned, mail ports are included in the probe; when it isn't, they're not.
  • When acme-dns is part of the setup, port 53 is probed.
  • Existing single-site, non-mail founding flows see no change in the pass/fail outcome (only richer per-port reporting), so their current tests keep passing.

Out of scope:

  • Deciding whether WireGuard/relay ports should block hand-off for single-site fleets (only multi-site needs them reachable, per the architecture doc's own guidance) — probe and report them, but the blocking policy for multi-site is a separate architectural ruling (#329); don't gate single-site hand-off on ports it doesn't need.
  • The multi-site bootstrap gap itself (#329).
> *This was generated by AI during triage.* **Verified:** `webPorts = []int{80, 443}` confirmed as the only ports probed, and confirmed the pass condition is "at least one of these answers" (an early return once `len(open) > 0`). Confirmed acme-dns's public listener is on port 53, WireGuard on 51820/udp and coturn on 3478/udp per the architecture doc, and mail ports per ADR 0115 — none of these are probed anywhere in the reachability package. Claim holds. ## Agent Brief **Category:** bug **Summary:** The public reachability gate should probe the ports the configuration being stood up actually needs, not just 80/443, and report per-port results. **Current behavior:** The outside-in reachability probe checks only ports 80 and 443, and passes as soon as one of the two answers. It never checks DNS (53), WireGuard (51820/udp), the TURN relay (3478/udp), or mail ports — so a gateway can pass the gate and hand off with, e.g., 443 open but 80 closed, or with DNS/mesh/mail unreachable. For a single-site, non-mail fleet this doesn't currently bite (the mesh forms over the LAN), which is likely why it hasn't been noticed. **Desired behavior:** The gate probes the set of ports relevant to the configuration being stood up — both web ports always, DNS when acme-dns is part of the setup, mail ports when mail is provisioned — and reports which specific ports are open/filtered/refused, rather than collapsing to a single pass/fail bit, so the existing three troubleshooting lanes (ports/firewall/CGNAT) stay accurate per port rather than for an aggregate result. **Key interfaces:** - The prober's fixed port list becomes a set computed from what's being provisioned, rather than a hardcoded two-port constant. - The pass condition changes from "at least one of N answers" to something that reflects each individually-relevant port's state — at minimum, both web ports should each be checked rather than either being sufficient. - The result type already distinguishes open/filtered/refused per port internally for the two web ports; extend that per-port reporting to the fuller set instead of collapsing it. **Acceptance criteria:** - [ ] A gateway with 80 open but 443 closed no longer silently passes as if both were fine — the per-port state is visible in the result. - [ ] When mail is being provisioned, mail ports are included in the probe; when it isn't, they're not. - [ ] When acme-dns is part of the setup, port 53 is probed. - [ ] Existing single-site, non-mail founding flows see no change in the pass/fail outcome (only richer per-port reporting), so their current tests keep passing. **Out of scope:** - Deciding whether WireGuard/relay ports should block hand-off for single-site fleets (only multi-site needs them reachable, per the architecture doc's own guidance) — probe and report them, but the blocking policy for multi-site is a separate architectural ruling (#329); don't gate single-site hand-off on ports it doesn't need. - The multi-site bootstrap gap itself (#329).
Author
Owner

Fixed in cd6710f (on main).

The P1-S10 gate no longer passes on "at least one of 80/443 answers" — both web ports are now required, and the port set is scoped to the configuration being stood up:

  • founding.Reachability.Probe now takes a ProbeSpec{AcmeDNS, Mail}; RunReachability derives it from the draft Address kind — own-domain runs acme-dns for the delegated zone (ADR 0014) so port 53 is probed and required, while the broker-delegated subdomain path needs no acme-dns port. Mail is provisioned later (ADR 0115), so it is never in the founding-time spec, but the same probe covers 25/465/587/993 once a mail-provisioning surface drives it.
  • ReachabilityResult now carries a per-port []PortResult (open/refused/filtered) and the ports/firewall lanes name the actual not-open ports, so the three troubleshooting lanes stay accurate per port rather than collapsing to one bit.

Acceptance:

  • ✅ 80 open / 443 closed no longer silently passes; per-port state is in the result (TestProbe_OneWebPortClosedDoesNotPass).
  • ✅ Mail ports probed only when provisioned (TestProbe_MailPortsProbedOnlyWhenProvisioned).
  • ✅ Port 53 probed when acme-dns is part of the setup (TestProbe_AcmeDNSPortProbedWhenInSpec + founding wiring TestReachabilityProbeSpecScopedToAddressKind).
  • ✅ Single-site non-mail subdomain flows: unchanged pass/fail; existing founding tests green.

Out of scope per triage: the multi-site WireGuard/relay blocking policy stays a separate architectural ruling (#329) — this slice does not gate single-site hand-off on ports it does not need.

Evidence: internal/reachability/prober_test.go, internal/founding/standup_test.go; control-plane/cmd/smoke-reachability + scripts/smoke-reachability.sh updated to answer on both web ports (live clan-lab run deferred). go build/vet/test + the push go-ci gate (golangci-lint) green.

Fixed in cd6710f (on `main`). The P1-S10 gate no longer passes on "at least one of 80/443 answers" — **both** web ports are now required, and the port set is scoped to the configuration being stood up: - `founding.Reachability.Probe` now takes a `ProbeSpec{AcmeDNS, Mail}`; `RunReachability` derives it from the draft Address kind — own-domain runs acme-dns for the delegated zone (ADR 0014) so **port 53 is probed and required**, while the broker-delegated subdomain path needs no acme-dns port. Mail is provisioned later (ADR 0115), so it is never in the founding-time spec, but the same probe covers `25/465/587/993` once a mail-provisioning surface drives it. - `ReachabilityResult` now carries a per-port `[]PortResult` (`open`/`refused`/`filtered`) and the ports/firewall lanes name the **actual** not-open ports, so the three troubleshooting lanes stay accurate per port rather than collapsing to one bit. Acceptance: - ✅ 80 open / 443 closed no longer silently passes; per-port state is in the result (`TestProbe_OneWebPortClosedDoesNotPass`). - ✅ Mail ports probed only when provisioned (`TestProbe_MailPortsProbedOnlyWhenProvisioned`). - ✅ Port 53 probed when acme-dns is part of the setup (`TestProbe_AcmeDNSPortProbedWhenInSpec` + founding wiring `TestReachabilityProbeSpecScopedToAddressKind`). - ✅ Single-site non-mail subdomain flows: unchanged pass/fail; existing founding tests green. Out of scope per triage: the multi-site WireGuard/relay **blocking** policy stays a separate architectural ruling (#329) — this slice does not gate single-site hand-off on ports it does not need. Evidence: `internal/reachability/prober_test.go`, `internal/founding/standup_test.go`; `control-plane/cmd/smoke-reachability` + `scripts/smoke-reachability.sh` updated to answer on both web ports (live clan-lab run deferred). `go build/vet/test` + the push go-ci gate (golangci-lint) green.
ben closed this issue 2026-08-07 19:32:18 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Matou/idss#328
No description provided.