跳至主要內容

為什麼我的顧客 WiFi 無法連線?Captive Portal 問題排查指南

本權威技術參考指南說明了 Captive Portal 偵測的底層機制,並詳細介紹了導致顧客 WiFi 無法連線的六種主要故障模式。它為 IT 經理和網路架構師提供了一個實用的疑難排解框架,用以解決 HTTP 重新導向問題、DNS 衝突以及 MAC 隨機化挑戰。

📖 6 分鐘閱讀📝 1,384 字數🔧 2 範例3 練習題📚 8 關鍵定義

收聽此指南

查看播客逐字稿
TITLE: Why Is My Guest WiFi Not Connecting? Troubleshooting Captive Portal Issues FORMAT: Purple Technical Briefing Podcast VOICE: UK English - Senior Solutions Architect tone DURATION: Approximately 10 minutes --- SECTION 1: Introduction and Context - approximately 1 minute Hello, and welcome to this technical briefing from Purple. I am your host, and today we are tackling one of the most persistent, most misunderstood problems in enterprise wireless networking: the guest WiFi captive portal that simply refuses to load. You have been there. A guest arrives at your hotel, your retail store, your stadium, or your conference centre. They join the WiFi network. Nothing happens. No login page. No internet. Just a spinning icon and a growing sense of frustration. For venue operations directors and IT managers, that moment is not just a minor inconvenience. It represents a direct failure of your guest experience, a spike in front-of-house support calls, and a missed opportunity to capture the first-party data that justifies your wireless infrastructure investment. In this briefing, we are going to go under the hood. We will explain exactly how captive portal detection works at the operating system level, identify the six root causes responsible for the vast majority of connection failures, and give you a practical, actionable troubleshooting framework you can hand to your IT team today. Let us get into it. --- SECTION 2: Technical Deep-Dive - approximately 5 minutes To fix a captive portal problem, you first need to understand what a captive portal actually does at the network level. Most people think of it as simply a login page. It is actually a network-level traffic interception mechanism, and that distinction matters enormously when things go wrong. Here is the sequence. A guest's device joins your guest SSID and receives an IP address via DHCP. At that point, the operating system does not wait for the user to open a browser. In the background, a system service immediately fires off an unencrypted HTTP GET request to a vendor-controlled probe URL. Apple devices query captive.apple.com. Android devices query connectivitycheck.gstatic.com. Windows devices query msftconnecttest.com. Firefox has its own probe at detectportal.firefox.com. If the network has open internet access, these probes return their expected responses, and the operating system concludes everything is fine. But on a guest network, your wireless gateway or controller intercepts that HTTP probe before it reaches the internet. Instead of the expected response, the gateway returns an HTTP 302 redirect pointing to your captive portal splash page. The operating system detects the unexpected redirect, realises it is behind a captive portal, and opens a sandboxed browser window - often called the Captive Portal Assistant - to display the login page. That is the happy path. Now let us talk about the six ways it breaks. Root cause number one: DHCP pool exhaustion. This is the silent killer at high-density events. If you are running a conference with two thousand attendees on a standard slash-24 subnet, you have 254 usable IP addresses. If your DHCP lease time is set to the default 24 hours, you will exhaust that pool within minutes of doors opening. Every subsequent connection attempt fails before the captive portal sequence even begins. The fix is straightforward: set guest DHCP lease times to between 15 and 30 minutes for high-turnover environments, and size your subnets appropriately for peak concurrent users, not just total headcount. Root cause number two: DNS interception failure. The captive portal redirect depends on the gateway intercepting the HTTP probe. But the probe requires a DNS lookup first. If your DNS configuration does not permit pre-authenticated clients to resolve external domain names, the probe never fires. Ensure your firewall policy explicitly allows DNS queries from unauthenticated clients, and verify that your DNS interception is working by running a packet capture against a test device. Root cause number three: incomplete walled garden. The walled garden - also called the pre-authentication access control list - defines which external domains unauthenticated guests can reach. If your portal splash page loads assets from a CDN that is not in the walled garden, the page renders as a blank screen. If you offer social login via Google, Apple, or Facebook, every OAuth domain those providers use must be whitelisted. And here is the critical point: social identity providers update their CDN IP ranges and authentication domains regularly. A walled garden that worked perfectly six months ago may be silently broken today. Schedule quarterly walled garden audits and use wildcard domain snooping where your hardware supports it. On Cisco Meraki, HPE Aruba, Ruckus, and Juniper Mist, this is available natively. Root cause number four: HSTS blocking the redirect. HTTP Strict Transport Security, or HSTS, is a browser security policy that forces connections to specific domains over HTTPS only. If a guest's device attempts to contact an HSTS-preloaded domain - and that includes virtually every major website - and your gateway tries to intercept that HTTPS request to redirect to the portal, the browser detects a certificate mismatch. It presents a non-bypassable security warning and blocks the redirect entirely. The correct solution is never to attempt HTTPS interception. Your gateway should only redirect the unencrypted HTTP canary probes. The long-term standards-based fix is RFC 8910, which defines DHCP Option 114. This option allows your DHCP server to directly advertise the captive portal URL to the client device, bypassing the need for HTTP redirection entirely. iOS 14 and Android 11 and above support this natively. Root cause number five: active VPN on the guest device. A VPN encrypts all traffic from the device and routes it through an external tunnel before it reaches your gateway. Your gateway never sees the HTTP probe. The captive portal detection sequence never triggers. The guest sees no login page and no internet. The fix for the guest is simple: disable the VPN, connect to the portal, then re-enable the VPN. For your front-of-house staff, this should be the first question they ask when a guest reports a connection problem. Root cause number six: MAC address randomisation breaking session persistence. Modern iOS and Android devices use randomised MAC addresses by default as a privacy feature. Each time a device connects to a network, it may present a different MAC address. Since captive portal session state is tracked by MAC address, a guest who authenticated an hour ago may be presented with the login page again after their device's MAC rotates. The guest-facing fix is to disable Private Address for your specific SSID in the network settings. The operator-side fix is to implement profile-based authentication - such as OpenRoaming via Passpoint and 802.1X - which authenticates at Layer 2 using credentials rather than MAC addresses, making randomisation irrelevant. --- SECTION 3: Implementation Recommendations and Pitfalls - approximately 2 minutes Now that we understand the root causes, let us talk about what a well-configured captive portal deployment actually looks like. Start with your DHCP architecture. For any venue expecting more than 200 concurrent devices, move away from a single slash-24 subnet. Use slash-22 or larger, and set lease times to match your venue's dwell profile. A hotel sets leases to 8 hours. A stadium sets leases to 3 hours. A shopping centre sets leases to 90 minutes. A conference centre sets leases to 30 minutes. Next, validate your walled garden before every major event. The minimum required entries are: your portal's FQDN and all associated CDN domains, the captive portal detection URLs for Apple, Google, Windows, and Firefox, and the OAuth domains for every social login provider you support. On Purple's platform, we maintain and update these walled garden entries automatically as part of our cloud-managed service, which removes the manual maintenance burden from your team. For your portal certificate, use a publicly trusted TLS certificate from a recognised certificate authority. Self-signed certificates will trigger browser warnings on every device. Renew certificates before expiry - a lapsed certificate is one of the most common causes of sudden, venue-wide portal failures. One pitfall that catches many IT teams: testing the portal from a device that has previously authenticated. Your device's session is still active, so you bypass the portal entirely and conclude everything is working. Always test from a device in a fresh, unauthenticated state - either a new device, or one where you have forgotten the network and cleared the WiFi profile. Finally, consider the strategic direction of travel. Captive portals are a mature technology, but they carry inherent friction. OpenRoaming, built on Passpoint and 802.1X, allows returning guests to connect automatically and securely without ever seeing a login page. Purple acts as a free identity provider for OpenRoaming under our Connect plan. Venues like Premier Inn and Manchester Airports Group are already deploying this to eliminate re-authentication friction for repeat visitors while maintaining full GDPR compliance and first-party data capture. --- SECTION 4: Rapid-Fire Q and A - approximately 1 minute Let us run through the most common questions we hear from venue IT teams. Question: Why does the portal work on iPhones but not on Android devices? Answer: Android uses connectivitycheck.gstatic.com as its probe URL. If that domain is blocked by your firewall or not in your walled garden, Android devices never trigger the portal. Add it explicitly. Question: A guest says the portal loaded but they cannot get online after logging in. Answer: This is almost always a RADIUS authorisation failure. Check that your RADIUS server is reachable from the wireless controller, verify the shared secret matches on both sides, and review the RADIUS logs for Access-Reject messages. Question: How do we handle guests who keep getting logged out after a few minutes? Answer: Check your idle timeout setting. Many controllers default to a 5-minute idle timeout, which is far too aggressive for mobile devices that sleep between interactions. Set idle timeout to at least 30 minutes for hospitality and retail environments. --- SECTION 5: Summary and Next Steps - approximately 1 minute To summarise: guest WiFi captive portal failures fall into six categories - DHCP exhaustion, DNS interception failure, incomplete walled garden, HSTS redirect blocking, active VPN on the client device, and MAC address randomisation. Each has a specific, testable fix. For your IT team, the immediate actions are: audit your DHCP lease times and subnet sizing, validate your walled garden against the current OAuth domains of your social login providers, and test your portal from a fresh unauthenticated device after every configuration change. For your longer-term roadmap, evaluate OpenRoaming as the successor to captive portal re-authentication for returning visitors. The technology is mature, the standards are established under IEEE 802.1X and WPA3-Enterprise, and Purple makes it available at no additional software cost under the Connect plan. For more technical guides, case studies, and implementation resources, visit purple.ai. Thank you for listening to this Purple technical briefing. Keep your networks reliable and your guests connected.

header_image.png

執行摘要

對於現代企業場域而言,顧客無線網路已不再只是單純的便利設施;它們代表了客戶互動、營運智慧和品牌定位的關鍵接觸點。然而,這些網路的商業價值完全取決於初始連線體驗的可靠性。當顧客連線到網路而 Captive Portal 登入頁面未能顯示時,場域會立即面臨前台摩擦增加、支援工單激增以及失去數據收集機會的困境。

這些失敗的核心在於安全網路標準與 Captive Portal 歷史上使用的網路層攔截技術之間的根本衝突。現代網頁瀏覽器和作業系統旨在偵測並封鎖未經授權的流量重新導向,以保護使用者免受中間人攻擊。透過了解精確的 HTTP 和 DNS 重新導向順序、HSTS 等安全協定的影響,以及現代行動裝置的隱私功能, IT 團隊可以建構強健的無線存取解決方案。本指南提供了診斷和解決「顧客 WiFi 無法連線 Captive Portal」故障狀態根源的決定性框架。

收聽完整的技術簡報:

技術深度解析:Captive Portal 偵測的實際運作原理

要排查 Captive Portal 問題,您必須首先了解 Captive Portal 在網路層面上的實際作用。大多數人認為它只是一個登入頁面。實際上,它是一個網路層的流量攔截機制。

當裝置加入您的顧客 SSID 並透過 DHCP 取得 IP 位址時,作業系統不會等待使用者開啟瀏覽器。在背景中,系統服務會立即向業者控制的探測 URL 發送一個未加密的 HTTP GET 請求。Apple 裝置會查詢 captive.apple.com。Android 裝置會查詢 connectivitycheck.gstatic.com。Windows 裝置會查詢 msftconnecttest.com

如果網路具有開放的網際網路存取權限,這些探測將傳回其預期回應,作業系統便會判定一切正常。但在顧客網路上,您的無線閘道器或控制器會在該 HTTP 探測到達網際網路之前將其攔截。閘道器不會傳回預期回應,而是傳回指向您的 Captive Portal 歡迎頁面(Splash Page)的 HTTP 302 重新導向。作業系統偵測到此非預期的重新導向,意識到其位於 Captive Portal 後方,並開啟一個沙盒瀏覽器視窗以顯示登入頁面。

captive_portal_flow_diagram.png

六大主要故障模式

當顧客回報 WiFi 無法連線時,故障幾乎總是源於中斷此順序的六個根本原因之一。

1. DHCP 位址池耗盡 這是高密度活動中的隱形殺手。如果您在標準的 /24 子網路上舉辦一場有 2,000 名與會者的會議,您將擁有 254 個可用 IP 位址。如果您的 DHCP 租期設定為預設的 24 小時,您將在開門後幾分鐘內耗盡該位址池。隨後的每一次連線嘗試甚至在 Captive Portal 順序開始之前就宣告失敗。

2. DNS 攔截失敗 Captive Portal 重新導向取決於閘道器攔截 HTTP 探測。但該探測首先需要進行 DNS 查詢。如果您的 DNS 設定不允許未驗證的用戶端解析外部網域名稱,則探測永遠不會觸發。

3. 圍牆花園(Walled Garden)設定不完整 圍牆花園定義了未驗證的顧客可以存取哪些外部網域。如果您的 Portal 歡迎頁面從不在圍牆花園中的 CDN 載入資源,該頁面將呈現為空白畫面。如果您提供透過 Google、Apple 或 Facebook 的社群登入,這些提供者使用的每個 OAuth 網域都必須列入白名單。社群身分識別提供者會定期更新其 CDN IP 範圍。六個月前運作完美的圍牆花園今天可能會在不知不覺中失效。

4. HSTS 阻擋重新導向 HTTP 嚴格傳輸安全(HSTS)是一種瀏覽器安全原則,強制僅透過 HTTPS 連線到特定網域。如果顧客嘗試存取預載 HSTS 的網域,而您的閘道器試圖攔截該 HTTPS 請求以重新導向至 Portal,瀏覽器將偵測到憑證不符。它會顯示一個無法繞過的安全警告,並完全阻擋重新導向。正確的解決方案是絕不嘗試 HTTPS 攔截。您的閘道器應僅重新導向未加密的 HTTP 金絲雀(canary)探測。

5. 顧客裝置上啟用了 VPN VPN 會加密來自裝置的所有流量,並在到達您的閘道器之前將其路由至外部通道。您的閘道器永遠看不到 HTTP 探測。Captive Portal 偵測順序永遠不會觸發。

6. MAC 位址隨機化 現代 iOS 和 Android 裝置預設使用隨機 MAC 位址作為隱私功能。由於 Captive Portal 工作階段狀態是透過 MAC 位址進行追蹤的,因此一小時前已通過驗證的顧客在裝置 MAC 輪替後,可能會再次看到登入頁面。

實作指南:建構高可靠性架構

設定良好的 Captive Portal 部署需要跨 顧客 WiFi 基礎架構進行仔細的協調。

步驟 1:最佳化 DHCP 架構

對於任何預期會有超過 200 台同時連線的裝置,請避免使用單一 /24 子網路。請使用 /22 或更大的子網路,並根據您場域的停留時間特性來設定租期(lease times)。飯店可將租期設定為 8 小時;體育場設定為 3 小時;購物中心設定為 90 分鐘;會議中心則設定為 30 分鐘。

步驟 2:自動化 Walled Garden 管理

在每次重大活動前驗證您的 walled garden。在 Purple 的平台上,我們將其作為雲端管理服務的一部分,自動維護並更新這些 walled garden 項目,從而減輕您團隊的手動維護負擔。我們支援與 Cisco Meraki、HPE Aruba、Ruckus、Juniper Mist、Ubiquiti UniFi、Cambium、Extreme 和 Fortinet 的整合。

步驟 3:實作 RFC 8910 (DHCP Option 114)

解決 HSTS 衝突的長期標準化方案是 RFC 8910,它定義了 DHCP Option 114。此選項允許您的 DHCP 伺服器直接向用戶端裝置宣告 Captive Portal URL,從而完全繞過 HTTP 重新導向的需求。iOS 14 和 Android 11 及以上版本原生支援此功能。

最佳實踐

為回訪訪客部署基於設定檔的驗證 Captive Portal 是一項成熟的技術,但它們本身帶有使用摩擦。建構於 Passpoint802.1X 之上的 OpenRoaming,允許回訪訪客自動且安全地連線,而無需看到登入頁面。在我們的 Connect 方案下,Purple 充當 OpenRoaming 的免費身分識別提供者(identity provider)。像 Premier Inn 和曼徹斯特機場集團(Manchester Airports Group)等場域已經部署了此方案,以消除重複訪客重新驗證的摩擦,同時保持完全符合 GDPR 規範並收集第一方數據。

切勿使用已驗證的裝置進行測試 許多 IT 團隊常遇到的一個陷阱:使用先前已通過驗證的裝置來測試 portal。由於您的裝置工作階段(session)仍處於作用狀態,因此您會完全繞過 portal,並誤以為一切正常。請務必使用處於全新、未驗證狀態的裝置進行測試。

閱讀相關指南 若要深入了解如何保護您的網路安全,請參閱我們的 什麼是安全 WiFi:2026 年企業必備指南 以及我們的 頻寬管理:2026 年實用指南

疑難排解與風險緩釋

當賓客回報連線問題時,您的第一線服務人員需要一個快速的診斷架構。

troubleshooting_checklist.png

請指導您的員工先執行用戶端修正步驟:

  1. 請賓客停用任何使用中的 VPN。
  2. 指導賓客針對您特定的 SSID 關閉 MAC 隨機產生(專用位址)。
  3. 讓賓客開啟標準瀏覽器並瀏覽至 http://neverssl.com。由於此網站設計為絕不使用 SSL,閘道器可以輕鬆攔截請求並觸發重新導向。
  4. 如果上述方法皆失敗,請讓賓客清除(忘記)該網路並重新加入。

如果多個賓客都遇到同樣的問題,請升級至營運商端的檢查。立即檢視 DHCP 核心集(pool)使用率、驗證 RADIUS 記錄中的 Access-Reject 訊息,並測試 DNS 攔截。

投資報酬率與商業影響

可靠的 Captive Portal 對商業的影響遠不止於 IT 指標。透過消除連線失敗,場域能直接提高其行銷資料庫的成長率。

以 Harrods 為例,他們透過優化其 WiFi Analytics 和 Captive Portal 流程,實現了 57 倍的行銷投資報酬率。或者 AGS Airports,他們透過無縫的分級頻寬管理實現了 842% 的投資報酬率。可靠的連線體驗是收集現代意見回饋數據的基本要求,詳情請參閱我們的 現代意見回饋收集:2026 年場域指南 指南。

每一次 Captive Portal 載入失敗,都意味著流失一個客戶輪廓。透過實作本指南中概述的架構標準,IT 領導者能將其無線基礎設施從成本中心轉變為可靠、合規的營收產生器。

關鍵定義

Captive Portal

A network-level interception mechanism that forces an unauthenticated user to view and interact with a specific web page before being granted access to the public internet.

When IT teams deploy guest networks, the captive portal is the primary tool for enforcing terms of service and capturing first-party marketing data.

Walled Garden

A pre-authentication access control list (ACL) that defines which external IP addresses or domain names an unauthenticated device is permitted to access.

Crucial for allowing devices to load the captive portal splash page assets and communicate with social identity providers before the user has fully authenticated.

HSTS (HTTP Strict Transport Security)

A web security policy mechanism that helps to protect websites against man-in-the-middle attacks such as protocol downgrade attacks and cookie hijacking.

HSTS is the primary reason why intercepting HTTPS traffic to display a captive portal results in severe browser security warnings rather than a successful redirect.

RFC 8910 (DHCP Option 114)

An IETF standard that allows a DHCP server to directly advertise the URL of the captive portal to the client device during the initial IP address assignment.

This standard eliminates the need for HTTP redirection entirely, solving the HSTS conflict and providing a cleaner connection experience.

MAC Address Randomisation

A privacy feature in modern mobile operating systems that generates a new, random MAC address for each wireless network the device joins, or periodically rotates the address.

This feature breaks traditional captive portal session persistence, forcing returning guests to log in repeatedly unless the venue upgrades to profile-based authentication like OpenRoaming.

OpenRoaming

A global roaming federation built on Passpoint and 802.1X that allows users to connect to public WiFi networks automatically and securely without interacting with a captive portal.

Purple acts as a free identity provider for OpenRoaming under the Connect plan, allowing venues to eliminate re-authentication friction.

HTTP 302 Redirect

An HTTP response status code indicating that the requested resource resides temporarily under a different URI.

This is the specific mechanism the wireless gateway uses to redirect the device's HTTP canary probe to the captive portal splash page.

Canary Probe

An automated, unencrypted HTTP request sent by an operating system immediately after connecting to a network to test for internet connectivity.

Apple uses captive.apple.com; Android uses connectivitycheck.gstatic.com. Intercepting these probes is the foundation of captive portal detection.

範例

A 2,500-capacity conference centre in London is hosting a major technology summit. Within 45 minutes of the keynote beginning, attendees report that the 'guest wifi not connecting captive portal' issue is widespread. The SSID is visible, but devices either fail to obtain an IP address or receive an IP but see no login screen. The network is configured with a single /23 subnet and 12-hour DHCP leases.

  1. Identify DHCP Exhaustion: A /23 subnet provides 1,022 usable IP addresses. With 2,500 attendees, the pool is undersized. The 12-hour lease means addresses are not returned to the pool when attendees leave the building for lunch.
  2. Expand the Subnet: Reconfigure the guest VLAN to use a /21 subnet, providing 4,094 usable IP addresses, comfortably exceeding the venue capacity.
  3. Reduce Lease Time: Change the DHCP lease time from 12 hours to 30 minutes. This ensures that IP addresses from devices that disconnect (e.g., when an attendee leaves) are quickly reclaimed.
  4. Clear Leases: Clear the existing DHCP bindings to force active devices to renew under the new parameters.
考官評語: This scenario demonstrates the classic failure mode of undersized subnets and overly long lease times in high-density environments. The solution addresses both the immediate capacity constraint and the ongoing lifecycle management of the IP addresses. By reducing the lease time to 30 minutes, the network operator ensures efficient utilisation of the address space without requiring manual intervention.

A retail chain rolls out a new captive portal featuring social login via Google and Facebook. During testing, the IT team finds that the portal splash page loads correctly, but when a user taps 'Log in with Google', the page times out and fails to connect. Standard email registration works perfectly.

  1. Diagnose Walled Garden Failure: The timeout indicates that the unauthenticated client device cannot reach the Google OAuth servers to complete the authentication handshake.
  2. Audit Walled Garden Entries: Review the pre-authentication access control list on the wireless controller (e.g., Cisco Meraki or HPE Aruba).
  3. Add Required Domains: Add the specific Google and Facebook authentication domains (e.g., accounts.google.com) to the walled garden. Crucially, add wildcard entries for the CDNs that serve the login page assets (e.g., *.gstatic.com).
  4. Implement Automated Updates: Because these providers change their IP ranges frequently, configure the controller to use wildcard domain snooping rather than static IP whitelisting.
考官評語: The failure of social login while standard email login succeeds is the definitive symptom of an incomplete walled garden. The expert approach here is not just fixing the immediate missing domain, but implementing wildcard domain snooping to prevent the issue from recurring when the identity provider updates their infrastructure.

練習題

Q1. A retail venue reports that their captive portal works perfectly for guests using standard email registration, but guests attempting to use the 'Log in with Facebook' option experience a blank white screen after tapping the button. What is the most likely architectural cause?

提示:Consider what network resources the unauthenticated device needs to reach to render the Facebook login prompt.

查看標準答案

The venue has an incomplete walled garden. The wireless gateway is blocking the unauthenticated device from reaching Facebook's OAuth domains or CDN infrastructure. The IT team must update the pre-authentication access control list to include all required wildcard domains for Facebook authentication.

Q2. You are designing the guest WiFi architecture for a major football stadium. The venue holds 60,000 fans, and matches last approximately 3 hours. The current configuration uses a /16 subnet and 24-hour DHCP lease times. During the first match, thousands of fans report they cannot connect. What changes should you implement?

提示:Calculate the total available IP addresses in the subnet versus the venue capacity, and evaluate the lifecycle of those addresses.

查看標準答案

The network is experiencing DHCP pool exhaustion. A /16 subnet provides 65,534 usable IP addresses, which is theoretically enough for 60,000 fans. However, with a 24-hour lease time, any device that connects briefly (e.g., staff, vendors, or fans walking past) consumes an IP address that will not be released until the next day. The solution is to reduce the DHCP lease time to 3 hours to match the venue's dwell profile, ensuring IP addresses are recycled efficiently during the event.

Q3. A hotel guest complains that the captive portal login page does not appear automatically on their laptop. When the front desk staff checks the guest's device, they notice a corporate VPN client is running. Why does the VPN prevent the portal from loading?

提示:Consider how a VPN routes traffic and how the gateway intercepts the captive portal probe.

查看標準答案

The VPN encrypts all traffic from the laptop and attempts to route it through a secure tunnel to the corporate server. Because the traffic is encrypted, the local wireless gateway cannot inspect it, cannot identify the unencrypted HTTP canary probe, and therefore cannot issue the HTTP 302 redirect required to trigger the captive portal. The guest must disable the VPN, authenticate via the portal, and then re-enable the VPN.