Description
This article describes a known-issue where users are stuck in an HTTP redirection loop after authenticating via captive portal (both for wired and wireless clients), and it also describes the auth-src-mac CLI option that affects this behavior. The following are symptoms associated with this issue:
Scope
FortiGate, Captive Portal, Firewall User Authentication
Solution
In the original design, Firewall Authentication on the FortiGate was Source IP-based only: users would authenticate to the FortiGate (using a captive portal, for example) and be allowed through as long as the Source IP of the incoming traffic matched an existing authenticated Firewall User entry.
In FortiOS 5.6.4, 6.0.0 and onward, security was enhanced by allowing the FortiGate to bind the MAC address of the user's device to the Firewall User entry. This allows the FortiGate to check the Source MAC address of incoming traffic, which in-turn prevents users from attempting to impersonate other authenticated devices based on Source IP alone. However, this security feature only works if the FortiGate can see the MAC address of the actual authenticated device, which means that the device must be in the same broadcast domain/subnet as the FortiGate itself (in the same VLAN, for example).
If the device is behind another Layer 3 network device (such as a core switch or a router) then the FortiGate will see the MAC address of the L3 network device and not the MAC address of the actual authenticated device, and so the FortiGate will reject the traffic. When using captive-portal authentication, this can result in a loop where the client completes authentication to the FortiGate captive portal, attempts to reach a website behind the FortiGate, and is then caught and redirected back to the captive portal since the Source MAC does not match the authenticated Firewall User entry.
To solve this issue, FortiOS 6.0.2, 6.2.0, and onward added the following configuration option to allow administrators the flexibility to disable this security feature if necessary. This setting should be disabled when clients are behind L3 network devices to prevent the HTTP redirect loop from occurring:
config user setting
set auth-src-mac [enable** | disable] << **enabled by default
end
Additional Reading
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.