Created on
‎10-06-2022
02:01 AM
Edited on
‎12-17-2025
10:30 AM
By
Stephen_G
| Description |
This article describes a FortiGate feature enhancement that allows administrators to set different captive portal authentication URLs on a per-interface/SSID basis. |
| Scope |
FortiGate v7.0.6 and newer versions. |
| Solution |
As a primer, captive portals on the FortiGate work by intercepting client web traffic and redirecting the connection to an authentication portal hosted on the FortiGate. By default this authentication/captive portal URL is based on the FortiGate's interface IP address, but it is possible to override this and set a globally-used FQDN address to use instead. For example:
config firewall auth-portal set portal-addr 'fgt.test.lab' end
One issue with setting a global captive portal address is that it is shared with all captive-portals hosted on the FortiGate, which means that users on each network segment must be able to both resolve the FQDN via DNS and also access the IP address that the FQDN resolves to. This can be a difficult issue to solve since it would require DNS to conditionally resolve one shared FQDN to a different IP address depending on which network segment the client is connected to (not possible to solve with a single DNS server, generally speaking).
To solve this issue, FortiOS 7.0.6 and later have added the ability to set separate captive portal addresses on a per-interface/per-SSID basis, as well as the ability to set separate certificates to use for the authentication portal:
Per-Network Interface:
config system interface edit <name> set security-mode captive-portal <----- Must be set first before the other options appear. set auth-cert <certificate_name> set auth-portal-addr <fqdn_string> next end
Per-Wireless SSID:
config wireless-controller vap edit <Name> set captive-portal enable <----- Must be set first before the other options appear. set auth-cert <certificate_name> set auth-portal-addr <fqdn_string> next end
While it is not strictly mandatory to set an FQDN for usage with the captive portal, it is necessary in order to have a seamless user experience with encrypted authentication between the user and the FortiGate. For reference, the following is a typical captive portal authentication flow:
For a seamless user experience, ensure that an FQDN (e.g., 'captiveportal.example.com') is specified using the auth-portal-addr setting, and also ensure that the auth-cert setting is set to a certificate that includes the captive portal FQDN in the Subject Alternative Name field.
For a comparison of the global portal-addr vs. per-network auth-portal-addr settings, along with a practical configuration example for how to use the FortiGate as a local DNS server to resolve these captive portal FQDNs, refer to Technical Tip: FortiGate configured with multiple captive portals and as a DNS server.
Related document: |
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.