This solution demonstrates the configuration when a FortiSwitch is used.
When a 3rd party switch is used instead, create a VLAN sub-interface instead of a FortiSwitch VLAN. Connect the FortiGate interface to the trunk port of the switch.
- Go to WiFi & Switch Controller > FortiSwitch VLANs.
- Select Create New.
- In the New Interface window, enter a name for the interface. Optionally, enter an alias.
- Select 802.1Q as the VLAN protocol.
- Ensure that a FortiLink interface member is selected in Interface.
- In VLAN ID, enter a VLAN ID, here
- Ensure that the Role is set as LAN.
- In the Address pane:
- In Addressing mode, select Manual.
- In IP/Netmask, enter an IP address/netmask.
- In IPv6 addressing mode, select Manual.
- Ensure that the Create address object matching subnet is enabled.
- Enable DHCP Server, and in the DHCP server pane:
- Enter an address range.
- For DNS server, select Specify, click the Add icon, and enter the IP address of the FortiSwitch.
- In the Network pane:
- Ensure that Device detection is enabled.
- Enable Security mode, and from the dropdown, ensure that Captive Portal is selected.
- In Authentication portal, select External, and enter the portal URL for the captive portal policy configured on FortiAuthenticator.
- In User access, select Restricted to Groups.
- In User groups, select Guest.
- In Exempt destinations/services, select the address objects for the FortiAuthenticator and DNS servers.
For the selected addresses and services, FortiGate does not present the captive portal page when the policy for the selected traffic is matched.
In the Select Entries window, go to Create > Create New to create new addresses and services.
- Optionally, in Redirect after Captive Portal, select Specific Request, and enter a URL to redirect users to a specific URL once authenticated.
- Click OK.