Created on
10-06-2022
01:42 AM
Edited on
04-10-2025
06:51 AM
By
Jean-Philippe_P
Description
This article describes how to create a captive portal in FortiGate to authenticate users accessing the network.
It also shows the redirect functionality that is commonly used together with the captive portal.
Scope
FortiGate v6.4 and above.
Solution
Go to Policy & Objects -> Firewall Policy and select 'Create new/Edit'.
Enable the following features:
config firewall policy
edit 1
set name "example-policy"
set srcintf "port2"
set dstintf "port1"
set srcaddr "all"
set dstaddr "all"
set action accept
set schedule "always"
set service "ALL"
set users "ami" <----- Name of user/group.
set disclaimer enable
set auth-cert "Fortinet_CA_SSL"
set nat enable
set redirect-url "www.fortinet.com"
next
end
config firewall policy
edit <x>
set disclaimer enable
next
end
config firewall policy
edit <x>
set disclaimer enable
set redirect-url "www.fortinet.com"
next
end
The page will redirect to www.fortinet.com as per the configuration in the CLI.
Note:
In such scenarios, refer to the following article to ensure authentication is mandatory: How to force Authentication when 'catchall' policies are in place below the Authentication Policy
To verify user login logs, list users from CLI as per the commands below:
lab # diagnose firewall auth filter method fw
lab # diagnose firewall auth list
10.0.0.2, ami
src_mac: 00:44:69:83:03:01
type: fw, id: 0, duration: 30, idled: 0
expire: 300, allow-idle: 300
server: TestWin-server
packets: in 5610 out 3354, bytes: in 4691112 out 860753
group_id: 4
group_name: HR-group
----- 1 listed, 1 filtered ------
Related articles:
Technical Tip: Enabling and using the admin disclaimer page
Technical Tip: Configuring a disclaimer page on a FortiGate firewall policy
Technical Tip: FortiGate explicit proxy disclaimer
Technical Tip: How to configure different disclaimer for each protected domain
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.