Linux下使用arptables阻止arp欺騙—輕舞飛揚

來源:互聯網
上載者:User

標籤:policy   linux   飛揚   程式   

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


本文出自 “輕舞飛揚” 部落格,請務必保留此出處http://xiaofeixia.blog.51cto.com/521300/1567330

Linux下使用arptables阻止arp欺騙—輕舞飛揚

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.