Skip to content

Add post: "A captive portal for my guest WiFi, and the four bugs that made it real" - #21

Merged
Aswinmcw merged 1 commit into
mainfrom
post/captive-portal-guest-wifi
Jul 31, 2026
Merged

Add post: "A captive portal for my guest WiFi, and the four bugs that made it real"#21
Aswinmcw merged 1 commit into
mainfrom
post/captive-portal-guest-wifi

Conversation

@Aswinmcw

Copy link
Copy Markdown
Member

Writes up the guest captive portal (openNDS on OpenWrt + a PHP container on the NAS), structured around the four bugs rather than the build — the build was the boring part.

  • The gatewayhash you cannot compute. The docs imply SHA-256 of the gateway name; it is actually built inside the C binary from the bridge MAC. A plausible-but-wrong value passed every validation and failed silently in a different process.
  • The stranding bug. Three individually-correct behaviours composed into a trap that locked out guests who had just authenticated successfully.
  • 101 passing tests and an unreachable link. Every test used curl --resolve, which bypasses DNS by design. The suite was structurally incapable of catching the missing DNS record — a test that supplies the answer cannot discover the question.
  • The OTP flow is not an approval gate. It looks like asking permission, but nothing waits for a reply. What it actually provides is accountability after the fact, which is worth having under its real name.

Plus a short section on branding the portal, including the contrast trap: the site emerald is 3.0:1 on white, well under the 4.5:1 body text needs.

Verification

  • hugo --minify --gc clean on the pinned 0.163.3 extended, no warnings
  • Playwright E2E: 2/2 passing
  • Pre-commit secret scan clean

Also checked directly that no live secret appears in the post — the portal FAS key, gatewayhash, guest password, Telegram bot token and chat ID were each grepped for by value, plus private IPs, the real portal hostname, port and SSID. None present. The repo is public, so the post deliberately uses placeholder hostnames.

🤖 Generated with Claude Code

… made it real"

Writes up the openNDS + PHP guest portal: the non-derivable gatewayhash, the
stranding bug, the DNS gap that 101 passing tests structurally could not catch,
and why the self-service OTP flow is accountability rather than authorisation.

No live hostnames, keys or private addresses -- the repo is public.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Aswinmcw
Aswinmcw requested a review from a team as a code owner July 31, 2026 05:41
Copilot AI review requested due to automatic review settings July 31, 2026 05:41
@Aswinmcw
Aswinmcw requested a review from a team as a code owner July 31, 2026 05:41

@Aswincloud-Bot Aswincloud-Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Auto-approved: @Aswinmcw is a member of @Aswincloud/admins.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
blog 989c65e Commit Preview URL

Branch Preview URL
Jul 31 2026, 05:42 AM

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new long-form Hugo post documenting a guest WiFi captive portal build (openNDS on OpenWrt + a PHP container), framed around four debugging lessons learned while making the system trustworthy and user-safe.

Changes:

  • Adds a new post describing four “bugs” encountered (gatewayhash derivation, authentication stranding/race, DNS/test blind spot, OTP flow semantics).
  • Includes operational/security framing around what the OTP flow does and does not guarantee.
  • Includes a short branding/accessibility note on contrast ratios for the portal’s color palette.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread content/posts/captive-portal-guest-wifi.md
@Aswinmcw
Aswinmcw enabled auto-merge July 31, 2026 06:29
@Aswinmcw
Aswinmcw added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit 03df15c Jul 31, 2026
5 checks passed
@Aswinmcw
Aswinmcw deleted the post/captive-portal-guest-wifi branch July 31, 2026 06:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants