Wireless and network types
MAC filtering
Letting in only listed MAC addresses at an access point or switch port: easy to set up, and easy to get past.
The problem
The office wants only its own laptops on the network, so it lists their MAC addresses at the access point.
- accessPoint keeps an allow list: the laptop,
02:00:ab:00:00:03, may join; any other address is refused. - Every frame's header carries the laptop's MAC unencrypted, even on WPA2 or WPA3: only the contents are encrypted.
- A visitor in range listens for a moment and reads
02:00:ab:00:00:03off the air. - One command gives the visitor's card that address, and the allow list lets them by: MAC spoofing.
What you'd see
$ ip link set eth0 address 02:00:ab:00:00:03; ip link show eth0
12: eth0@if13: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 02:00:ab:00:00:03 brd ff:ff:ff:ff:ff:ff link-netnsid 0
- Run on the visitor's machine, whose card had
22:86:c0:dc:4a:9ca moment before. link/ether 02:00:ab:00:00:03: the laptop's address, now on the visitor's card. No password asked.- A Wi-Fi card is
wlan0rather thaneth0; the command is the same.
Guess first
The real laptop is switched off. Can the access point tell the visitor from it?
Show answer
No: the address is identical. Even a switch's port security, which ties an address to one port, lets a copied address through once the real device is unplugged.
In short
MAC filtering lets only listed MAC addresses onto an access point or switch port. It stops the honest, not attackers:
the MAC address travels unencrypted in every frame, even with WPA2 or WPA3, so anyone in range can read an allowed one
and give it to their own card (ip link set wlan0 address …). That is MAC spoofing. Real access control checks
the user or device: 802.1X (WPA2/WPA3-Enterprise on Wi-Fi).
Read next
- Port security A limit on how many MAC addresses one switch port accepts; one more is a violation that drops the frame or shuts the port.
- MAC address The 48-bit address of a network card, used to deliver frames within one network.
- 802.1X and EAP Port login: a switch port (or Wi-Fi association) passes only login frames until the device proves who is using it.
- Wi-Fi security: WEP, WPA, WPA2, WPA3 How a wireless network keeps strangers off and its frames private, from broken WEP to WPA3.