TL;DR
This guide shows you how to block Extensible Authentication Protocol over LAN (EAPOL) packets on your network. This is useful for preventing rogue access points or mitigating certain types of cyber security attacks.
Blocking EAPOL Packets: A Step-by-Step Guide
- Understand EAPOL
- EAPOL packets are used in 802.1X authentication, commonly found on Wi-Fi networks.
- Blocking them prevents devices from completing the authentication process.
- Be careful! Blocking EAPOL will disrupt legitimate users if not done correctly.
- Identify Your Network Interface
You need to know which network interface you want to apply the block to.
- On Linux, use
ip addrorifconfig. Look for the name of your wireless interface (e.g., wlan0). - On Windows, open Command Prompt and type
ipconfig /all. Find the adapter you’re using.
- On Linux, use
- Using iptables (Linux)
iptables is a powerful firewall tool on Linux.
- Block incoming EAPOL packets:
sudo iptables -A INPUT -p 802.1Q --dport 8809 -j DROPThis command adds a rule to the INPUT chain, dropping all packets with protocol 802.1Q (EAPOL) and destination port 8809.
- Block outgoing EAPOL packets:
sudo iptables -A OUTPUT -p 802.1Q --sport 8809 -j DROPThis command adds a rule to the OUTPUT chain, dropping all packets with protocol 802.1Q and source port 8809.
- Save the rules:
sudo iptables-save > /etc/iptables/rules.v4This saves your current iptables configuration so it persists after a reboot. The exact location of this file may vary depending on your distribution.
- List the rules to verify:
sudo iptables -L
- Block incoming EAPOL packets:
- Using Windows Firewall with Advanced Security
- Open ‘Windows Firewall with Advanced Security’.
- Click on ‘Inbound Rules’ in the left pane.
- Click ‘New Rule…’ in the right pane.
- Select ‘Custom’ and click ‘Next’.
- On the ‘Protocol and Ports’ page:
- Protocol type: Select ‘Ethernet (IEEE 802.3)’.
- Specific ports: Enter ‘8809’.
- On the ‘Scope’ page, you can specify which IP addresses or subnets to apply the rule to. Leave blank for all addresses.
- On the ‘Action’ page, select ‘Block the connection’.
- On the ‘Profile’ page, choose when to apply the rule (Domain, Private, Public).
- Give the rule a descriptive name and click ‘Finish’.
- Repeat steps 2-7 for ‘Outbound Rules’.
- Using Wireshark to Verify
Use Wireshark to confirm that EAPOL packets are being blocked.
- Start capturing traffic on your network interface.
- Attempt to connect to a Wi-Fi network using 802.1X authentication.
- Filter for ‘eapol’ in Wireshark. You should not see any EAPOL packets if the block is working correctly.
- Reverting the Changes
If you need to re-enable EAPOL, remove the iptables rules or disable the Windows Firewall rules you created.
- iptables: Use
sudo iptables -D INPUT ...andsudo iptables -D OUTPUT ...(replace ‘…’ with the original rule). Then save the changes. - Windows Firewall: Disable or delete the rules you created in steps 2-7.
- iptables: Use

