>>> 此貼的回復 >> ip 與 mac 寫在一檔案內,內容:
CODE:[Copy to clipboard]192.168.1.1 00:48:54:11:22:33 192.168.1.1 00:48:54:00:aa:bb ... shell script 使用程式代碼:
CODE:[Copy to clipboard](while read a b ; do echo "$ip; $mac" ; done) < mac.txt do iptables -A FORWARD -s $ip -m mac --mac-source $mac -j ACCEPT done