Fortinet FortiGate, FortiAP and FortiSwitch
This page configures a FortiGate (with FortiAP access points and FortiLink-managed FortiSwitches) to authenticate against Airgate, accept RADIUS CoA, and send guests to the Airgate portal through the FortiGate captive portal.
Before you begin
Section titled “Before you begin”- The FortiGate interface address that sends RADIUS, for example
10.0.0.1. - The Airgate RADIUS address (
203.0.113.10in the examples) and a shared secret. - NTP on the FortiGate: FortiGate rejects CoA without a valid
Event-Timestamp.
Step 1: Add the FortiGate in Airgate
Section titled “Step 1: Add the FortiGate in Airgate”- Go to Network › Switches and APs › Add device.
- Name
fgt-branch1, IP address or subnet10.0.0.1. - Vendor profile: FortiGate (FortiAP wireless, captive portal, user groups). The dictionary becomes
Fortinet, the CoA port3799. - On RADIUS, CoA & RadSec: enter the RADIUS shared secret, keep Require Message-Authenticator in Access-Requests on, turn on RADIUS CoA / Disconnect (RFC 5176).
- Select Save.
FortiSwitches authenticate their own ports. Add them separately with the profile FortiSwitch (standalone or FortiLink), using the address their RADIUS requests arrive from (the switch address, or the FortiGate address when FortiLink traffic is translated). Monitor › Alerts and events shows an unknown network device with the real source address if it differs.
Step 2: RADIUS server and user group
Section titled “Step 2: RADIUS server and user group”config user radius edit "Airgate" set server "203.0.113.10" set secret <shared-secret> set nas-ip 10.0.0.1 set auth-type auto set radius-coa enable set acct-interim-interval 600 config accounting-server edit 1 set status enable set server "203.0.113.10" set secret <shared-secret> set port 1813 next end nextendconfig user group edit "Airgate-Users" set member "Airgate" nextendset radius-coa enable lets the FortiGate accept CoA and Disconnect from Airgate. Also allow RADIUS accounting on the interface that faces Airgate, which opens the CoA listener:
config system interface edit "port1" append allowaccess radius-acct nextendAirgate returns FortiGate user groups with Fortinet-Group-Name and VLANs with the RFC 3580 attributes. Airgate’s CoA action for FortiGate is Disconnect; it sends User-Name and Framed-IP-Address together, as FortiGate requires.
Step 3: FortiAP 802.1X SSID
Section titled “Step 3: FortiAP 802.1X SSID”config wireless-controller vap edit "Corp-WiFi" set ssid "Corp-WiFi" set security wpa2-only-enterprise set auth radius set radius-server "Airgate" set dynamic-vlan enable nextendFor MAC authentication on an SSID, add set radius-mac-auth enable and set radius-mac-auth-server "Airgate".
Step 4: FortiSwitch 802.1X and MAB (FortiLink)
Section titled “Step 4: FortiSwitch 802.1X and MAB (FortiLink)”config switch-controller security-policy 802-1X edit "Airgate-8021X" set security-mode 802.1X-mac-based set user-group "Airgate-Users" set mac-auth-bypass enable set radius-timeout-overwrite enable nextendconfig switch-controller managed-switch edit "<switch-serial>" config ports edit "port10" set port-security-policy "Airgate-8021X" next end nextendAirgate’s CoA actions for FortiSwitch use Fortinet-Host-Port-AVPair: Reauthenticate (action=reauth-port), Bounce port (action=bounce-port), Disable port (action=disable-port), plus Disconnect and changing attributes. VLAN change by CoA needs FortiSwitchOS 6.4.12 / 7.2.2 or later.
Step 5: Guest SSID with the Airgate captive portal (optional)
Section titled “Step 5: Guest SSID with the Airgate captive portal (optional)”config firewall address edit "Airgate-Portal" set type fqdn set fqdn "airgate.contoso.com" nextendconfig user security-exempt-list edit "Airgate-Portal-Exempt" config rule edit 1 set dstaddr "Airgate-Portal" next end nextendconfig wireless-controller vap edit "Corp-Guest" set ssid "Corp-Guest" set security captive-portal set portal-type auth set external-web "https://airgate.contoso.com/portal/<tenant>/<portal>" set selected-usergroups "Airgate-Users" set security-exempt-list "Airgate-Portal-Exempt" nextendThe FortiGate appends post, magic, usermac, userip, apmac, apname, ssid and the original URL to the redirect. After sign-in, the Airgate portal posts the user name, password and magic to the FortiGate’s post URL, and the FortiGate sends a RADIUS PAP request to Airgate.
In Airgate, on the portal’s Login & network section: Vendor handling = Fortinet FortiGate / FortiAP (or Auto-detect), Login model = Web login.
Verify
Section titled “Verify”diagnose test authserver radius Airgate pap <user> <password>tests a user from the FortiGate CLI.- Monitor › Sign-in log shows the request from
fgt-branch1. - On Monitor › Connected now, choose Disconnect. The result is
Disconnect-ACK.
Troubleshooting
Section titled “Troubleshooting”| Symptom | Cause | Fix |
|---|---|---|
CoA timeout |
radius-coa not enabled, or radius-acct not allowed on the interface |
Enable both. |
CoA Disconnect-NAK |
Clock skew (Event-Timestamp), or no accounting for the session |
Fix NTP; turn on accounting. |
| Guest portal does not load | Portal host not exempt | Add it to the security exempt list. |
| Group not applied | Fortinet-Group-Name does not match a FortiGate group used in firewall policies |
Use the exact group name. |