Phones, laptops and the sign-in window
By the end you can
- Describe how a device discovers a captive portal and when its sign-in window closes
- Name the probe addresses the gateway must handle
- Explain the design rules that keep the portal working in a sign-in mini-browser
- Predict the effect of a private Wi-Fi address on vouchers and MAB
How a device meets the portal
- The device joins the Wi-Fi and asks a probe address.
- The gateway intercepts the probe and answers with a redirect to the portal.
- The operating system shows its sign-in window, a mini-browser, or a notification. The person signs in and the portal sends the browser on.
- The gateway lets the client through. The next probe gets its genuine answer, and the system closes the window and marks the network online.
Steps 2 and 4 are the gateway's job. Authcha's part is the page in step 3 and the helper pages it links to.
The probes
The gateway must intercept these before sign-in and answer genuinely after:
| Probe | Genuine answer |
|---|---|
captive.apple.com/hotspot-detect.html | Success page |
connectivitycheck.gstatic.com/generate_204 and similar | HTTP 204, no body |
www.msftconnecttest.com/connecttest.txt | Microsoft Connect Test |
detectportal.firefox.com/success.txt | success |
nmcheck.gnome.org/check_network_status.txt | NetworkManager is online |
pfSense's captive portal does this itself. Authcha does not answer probes, because they go to other hosts. It only has to avoid breaking them. If a phone keeps saying "no internet" after a good login, check the zone's allowed hostnames and that the gateway passes the probe through once the client is admitted.
The operating systems
| System | How the window appears | What to remember |
|---|---|---|
| iOS and macOS | The Captive Network Assistant mini-browser opens when the probe is not answered Success | No pop-ups, cookies may be sandboxed, no downloads. Private Wi-Fi Address is on by default |
| Android | A "Sign in to Wi-Fi network" notification opens a WebView | Old WebViews (Android 7) understand only old JavaScript. Randomised MAC per network is on by default from Android 10 |
| Windows 10 and 11 | The system opens the default browser or an Edge-based window | A normal browser. HTTPS to the portal needs a trusted certificate or it warns |
| Linux and ChromeOS | A notification offers to open a browser | A normal browser |
Why the pages are built the way they are
The sign-in windows are limited browsers. The generated pages use nothing they are known to lack:
| Rule | Why |
|---|---|
| No pop-ups, no new windows | The sign-in windows cannot open them, so every step stays in the same view |
| No cookies and no browser storage | Storage may be empty or blocked. Form protection is a signed, address-bound token in the form |
| No file downloads | Mini-browsers cannot download |
| No outside requests | Before sign-in the client reaches only the walled garden, so style, script and the logo are inline |
| Works without JavaScript | Every action is a plain form post or link. Script only adds friendliness |
| Old-browser JavaScript only | iOS 12 Safari and Android 7 WebView must parse it |
| Relative units and system fonts | Text scaling to 200% and right-to-left languages work without a sideways scrollbar |
Native "Sign in" with RFC 8908
Authcha can answer the Captive Portal API at https://<console>/p/<gateway>/capport. Advertise it with DHCP option 114 (and the Router Advertisement option for IPv6), allow the console in the walled garden and use a trusted certificate. Phones that implement it then show a native "Sign in" button and the time and data left. It is optional, and the redirect flow keeps working without it. It was not verified on a device.
Private Wi-Fi addresses
iOS, Android and Windows use a different MAC address per network, and some rotate it. The consequences:
- Sessions are keyed by client IP, so a rotating MAC does not confuse the status page or session control.
- Vouchers are tied to the MAC the device presented when it redeemed. If the address changes, the device is a new one: the portal asks for the voucher again, and the voucher's device count includes the old address. An administrator can revoke it and issue a new one.
- MAB entries for known devices need a stable address. Turn private addressing off for that network on managed devices, or use 802.1X.
The only place a changing address costs anything is the per-voucher device limit.
LabHands-on
- Open the phones and laptops guide and find the "Not verified" list for your operating systems.
- On a phone, connect to a captive network (the demo has none, so use your lab pfSense or a hotel network) and watch the sign-in window open and close.
- Check Private Wi-Fi Address on an iPhone or Wi-Fi privacy on an Android phone for your lab network. Redeem a voucher, then change the setting and reconnect. What happens?
- On a Linux laptop in the guest network, run
curl -i http://detectportal.firefox.com/success.txtbefore and after sign-in. Compare the answers. - List the five probe addresses from memory.
Check yourselfQuiz
Cheat sheetKeep this
- Flow: probe, redirect, sign-in window, admit, genuine probe answer, window closes.
- Gateway handles probes. Authcha does not.
- Portal pages: no pop-ups, no cookies or storage, no downloads, no outside requests, work without JavaScript.
- Private Wi-Fi address breaks voucher and MAB matching. Turn it off, or use 802.1X.
- RFC 8908:
https://<console>/p/<gateway>/capportand DHCP option 114 (optional, unverified on a device). - Read more: Captive portal: phones, laptops and assistants.