首页 > 代码库 > Linux下使用arptables阻止arp欺骗—轻舞飞扬

Linux下使用arptables阻止arp欺骗—轻舞飞扬

http://sourceforge.net/projects/ebtables/files/arptables/

    tar xvzf arptables-v0.0.4.tar.gz

   cd arptables-v0.0.4

   make

make install

命令程序

[root@extmail~]# 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

 

 

[root@mail 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
[root@mail 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)
[root@mail 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

[root@mail arptables-v0.0.4]# arptables-save>/etc/sysconfig/arptables
[root@mail arptables-v0.0.4]# service arptables start
启动 Arp filtering (arptables):                           [确定]

 

 

[root@extmail~]# 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


本文出自 “轻舞飞扬” 博客,请务必保留此出处http://xiaofeixia.blog.51cto.com/521300/1567330

Linux下使用arptables阻止arp欺骗—轻舞飞扬