首先安装arptables:
sudo apt-get install arptables
然后定义规则:
sudo arptables -A INPUT --src-mac ! 网关物理地址 -j DROP
sudo arptables -A INPUT -s ! 网关IP -j DROP
sudo arptables -A OUTPUT --destination-mac ff:ff:ff:ff:ff:ff -j ACCEPT
不过这样就有一点不好,局域网内的资源不能用!
sudo arptables -F
当然我们可以做个脚本,每次开机的时候自动运行!~sudo gedit /etc/init.d/arptables,内容如下:
#! /bin/sh
PATH=/u
发布时间:
2012-04-05 |
类别:
未分组 | 阅读:254229 | 评论:0 |
标签:
arp arp