http://sourceforge.net/projects/ebtables/files/arptables/
tar xvzf arptables-v0.0.4.tar.gz
cd arptables-v0.0.4
make
make install
命令程序
[[email protected]~]# ls /usr/local/sbin/arptables*
/usr/local/sbin/arptables
/usr/local/sbin/arptables-restore
/usr/local/sbin/arptables-save
启动脚本
/etc/rc.d/init.d/arptables
[[email protected] arptables-v0.0.4]# arptables -A INPUT -i eth0 --src-ip 172.16.1.254 --src-mac ! cc:00:04:fc:00:00 -j DROP
[[email protected] arptables-v0.0.4]# arptables -L -n
Chain INPUT (policy ACCEPT)
-j DROP -i eth0 -s 172.16.1.254 ! --src-mac cc:00:04:fc:00:00
Chain OUTPUT (policy ACCEPT)
Chain FORWARD (policy ACCEPT)
[[email protected] arptables-v0.0.4]# arptables-save
*filter
:INPUT ACCEPT
:OUTPUT ACCEPT
:FORWARD ACCEPT
-A INPUT -j DROP -i eth0 -s 172.16.1.254 ! --src-mac cc:00:04:fc:00:00
[[email protected] arptables-v0.0.4]# arptables-save>/etc/sysconfig/arptables
[[email protected] arptables-v0.0.4]# service arptables start
启动 Arp filtering (arptables): [确定]
[[email protected]~]# arptables-save
*filter
:INPUT ACCEPT
:OUTPUT ACCEPT
:FORWARD ACCEPT
-A INPUT -j DROP-i eth0 -s 172.16.1.254 ! --src-mac cc:01:05:10:00:00
arptables-save>/etc/sysconfig/arptables