Description
This article explains how to configure MAC filter on SSID.
Important note:
• The MAC filter function is independent of the SSID security mode.
• To enable MAC filter on SSID, first configure the wireless controller address and address group. See instructions below.
Scope
All FortiOS versions.
Solution
Note: the following instructions are relevant for FortiOS 7.0 and earlier. In FortiOS 7.2 and later the configuration method has changed (see further below for 7.2+ instructions).
To block a specific client from connecting to the SSID using MAC filter:
config wireless-controller address
edit "client_1"
set mac b4:ae:2b:cb:d1:72
set policy deny
next
end
config wireless-controller address
edit <id>
set mac {mac-address}
set policy [allow|deny] The default is deny.
next
end
allow Allow the client with this MAC address.
deny Block the client with this MAC address.
config wireless-controller addrgrp
edit mac_grp
set addresses "client_1"
set default-policy allow
next
end
config wireless-controller addrgrp
Description: Configure the MAC address group.
edit <id> set addresses <id1>, <id2>, ...
set default-policy [allow|deny] **default is allow**
next
end
allow : Allow the clients with MAC addresses that are not in the group.
deny: Block the clients with MAC addresses that are not in the group
config wireless-controller vap
edit wifi-vap
set ssid "Fortinet-psk"
set security wpa2-only-personal
set passphrase fortinet
set address-group "mac_grp"
next
end
After this configuration, the client (MAC address b4:ae:2b:cb:d1:72) will no longer be allowed to connect to SSID Fortinet-psk. Other clients will be able to connect to the SSID.
To allow a specific client to connect to the SSID using MAC filter:
config wireless-controller address
edit "client_1"
set mac b4:ae:2b:cb:d1:72
set policy allow
next
end
config wireless-controller addrgrp
edit mac_grp
set addresses "client_1"
set default-policy deny
next
end
config wireless-controller vap
edit wifi-vap
set ssid "Fortinet-psk"
set security wpa2-only-personal
set passphrase fortinet
set address-group "mac_grp"
next
end
After this configuration, the client (MAC address b4:ae:2b:cb:d1:72) will be allowed to connect to SSID Fortinet-psk. Other clients will not be able to connect to the SSID.
From 7.2.x onward, the configuration will be as below which is different from before:
config firewall address
edit "client-1"
set type mac
set macaddr "b4:ae:2b:cb:d1:72"
next
end
config firewall addrgrp
edit "mac-group"
set member "client-1"
next
end
config wireless-controller vap
edit "wifi-vap"
set ssid "Fortinet-psk"
set passphrase Fortinet
set address-group "mac-group"
set address-group-policy allow
next
end
To DENY the connection, select the created address-group and set the address-group-policy to deny:
config wireless-controller vap
edit "wifi-vap"
set ssid "Fortinet-psk"
set passphrase fortinet
set address-group "mac-group"
set address-group-policy deny
next
end
Related documents:
Wireless controller - FortiGate CLI reference
Config wireless controller access - FortiGate CLI reference
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 2024 Fortinet, Inc. All Rights Reserved.