fw_limit/filter_mac.sh

19 lines
234 B
Bash
Executable File

#!/bin/sh
startstop=$1
if [ -z "$startstop" ]; then
startstop="start"
fi
macsrc=$(cat ./mac.txt)
case "$startstop" in
start)
for i in $macsrc; do
echo iptables -I INPUT -m mac --mac-src $i -j DROP
done
;;
stop)
;;
esac