需要基于debian8 jessie处理arp flood——大量arp报文施加于设备某端口,设备业务通讯不受影响,查阅资料,比较好的方式是使用nftables工具;
nftables工具在linux内核版本>3.13以上均支持使用,但debian8 jessie无法apt-get install获取,需要从源码自己编译,官网链接https://netfilter.org/projects/nftables/
下载libmnl、libnftnl、nftables三个源码tar.bz2,先编译前两个,最后编译nftables,编译步骤常见三板斧,就完事了
./configure
make
make install
编译中途缺啥库,就apt-get install补充啥,
编译完成后,配置下动态库链接ldconfig,执行nft -v,检查下是否生效;
执行下nft -f arp_wall.nft就可以限流了,arp_wall.nft内容如下,语法可以看看
https://wiki.nftables.org/wiki-nftables/index.php/Main_Page
flush ruleset
table arp filter {
chain input {
type filter hook input priority 0; policy accep