Created on
11-15-2024
06:53 AM
Edited on
11-08-2025
12:21 PM
By
svkamleshkumar
This article describes the general captive portal flow inside captive portals as well as its troubleshooting.
The setup of a captive portal can be done in various ways as described in other articles and documents, for example:
Technical Tip: How to create FortiGate captive portal using policy
FortiGate Administration guide: Captive portals
FortiGate (and attached products).
To troubleshoot a captive portal issue, it is best to understand how the end user device that should get its traffic 'captured', sees its internet access. Generally, browsers and operating systems come with means to detect whether it is behind a captive portal. Typically, an unencrypted HTTP GET is sent to a certain website. If the response is unexpected, the device assumes it is behind a captive portal, and it may then give a message to log in before using the network, similar to this:
captive portal example
The following is a general captive portal redirection that may apply to other solutions as well. Note that a 'redirect' in this context, if not explicitly stated, means:
The captive portal flow on FortiGate follows this schema:
| Windows / Microsoft Edge | http://www.msftconnecttest.com/connecttest.txt, http://www.msftncsi.com/ncsi.txt |
| Android (Google) | http://connectivitycheck.gstatic.com/generate_204, http://clients3.google.com/generate_204, http://connectivitycheck.android.com/generate_204 |
| iOS / macOS (Apple) | http://captive.apple.com/hotspot-detect.html, http://www.apple.com/library/test/success.html, http://www.appleiphonecell.com/, http://www.itools.info/ |
| Chrome Browser (All Platforms) | http://www.gstatic.com/generate_204 |
| Firefox Browser | http://detectportal.firefox.com/success.txt |
| Opera Browser | http://www.opera.com/portaltest.txt |
| Ubuntu / GNOME NetworkManager | http://connectivity-check.ubuntu.com/ |
| Fedora / Red Hat | http://fedoraproject.org/static/hotspot.txt |
| Amazon Kindle / Fire OS | http://kindle-wifi.amazon.com/app.html |
Note:
For HTTPS to FortiGate, 'config firewall auth-portal' is required to be set with a resolvable FQDN for the FortiGate. It must resolve to the FortiGate interface IP, the default gateway for the client's subnet.
Note that this requirement does not change when an external captive portal is used. This still must reflect the FortiGate FQDN. It must not reflect the external captive portal, like FortiAuthenticator.
At this step, the browser or operating system detects it is behind a captive portal and a message similar to the example above may be displayed.
Adding an external captive portal (like FortiAuthenticator):
The following steps are for social login with FortiAuthenticator and are replacing step 11):
Troubleshooting:
The steps above must be followed. In case of issues with the captive portal, this indicates a deviation from the described procedure. Troubleshooting captive portals is best done with a packet capture that shows the end user's DNS queries and HTTP traffic. Steps 1-4, as well as any DNS queries and resulting HTTP requests, are typically visible in plaintext.
If the firewall policy on FortiGate towards the external captive portal does not require NAT, the packet capture against the client IP address is sufficient as a capturing filter.
The browser development tools (usually these can be opened with the keyboard press of F12) in conjunction with the packet capture via Wireshark may also add details as they show the HTTPS traffic as well as the HTTP responses. These are methods to read the DNS queries (for the captive portal detection pages, FortiGate, and attached external portal FQDNs) and the TCP/HTTP/TLS traffic to the respective nodes one by one.
During the troubleshooting of HTTP, strict transport security (HSTS) captive portal errors might also be experienced. Check the article on
How to troubleshoot HSTS error for captive portal for more information.
Keep in mind that the flow described above is strict to be followed, and error cases will usually divert from it, indicating where to troubleshoot.
The captive portal setup may also not work out well if multiple captive portals or authentication methods are serialized, leading to broken redirects. If unexpected browser messages appear, the link that the browser is currently at, will indicate working steps or whether there is another captive portal in the connection of the client in direction of the intended network resource. See to use only one captive portal, rather than using multiple.
Related articles:
Technical Tip: The typical captive portal workflow for an end-user with a FortiGate/FortiWiFi
Technical Tip: Fortinet's RADIUS Dictionary and VSAs (latest)
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2025 Fortinet, Inc. All Rights Reserved.