You can block traffic from specific MAC addresses using iptables
. If the MACs are in a file macs.txt
, you can add iptables
rules to drop them with the bash
one-liner:
while read mac; do iptables -I INPUT -m mac --mac-source $mac -j DROP; done < macs.txt