Chinaunix首页 | 论坛 | 博客
  • 博客访问: 2292931
  • 博文数量: 276
  • 博客积分: 5998
  • 博客等级: 大校
  • 技术积分: 5175
  • 用 户 组: 普通用户
  • 注册时间: 2010-12-24 14:43
文章分类

全部博文(276)

文章存档

2014年(25)

2013年(11)

2012年(69)

2011年(167)

2010年(4)

分类: LINUX

2011-09-29 09:00:00


  [root@localhost ~]# wget

  [root@localhost ~]#tar xvf arptables-v0.0.3-4.tar.gz

  [root@localhost ~]#cd arptables-v0.0.3-4.tar.gz

  [root@localhost ~]#make && make install

 

 

配置 :防止ARP最有效的方法是只允许网关的ARP ,我现在的环境网关IP59.37.172.1  MAC: 00:23:89:4D:29:12

本机IP: 59.37.172.81  MAC: 00:E0:81:D2:75:C5

另外一台机器IP59.37.172.80

 

要求 只允许和网关通信(这象是费话,不和网关通信数据怎么才能够出去呢)

# arptables -A INPUT --src-ip 59.37.172.81 --src-mac 00:23:89:4D:29:12 -j ACCEPT

#arptables -A INPUT --src-ip 59.37.172.1 --src-mac00:E0:81:D2:75:C5 -j ACCEPT

#arptables –P INPUT DROP

 

配置是不是很简单,和iptables 非常类似。不会的 man arptables  或者 google  关健字 arptables ,其实你们懂的J

现在在80PING 81

 

[root@localhost ~]# ping 59.37.172.81

PING 59.37.172.81 (59.37.172.81) 56(84) bytes of data.

From 59.37.172.80 icmp_seq=2 Destination Host Unreachable

From 59.37.172.80 icmp_seq=3 Destination Host Unreachable

From 59.37.172.80 icmp_seq=4 Destination Host Unreachable

From 59.37.172.80 icmp_seq=6 Destination Host Unreachable

From 59.37.172.80 icmp_seq=7 Destination Host Unreachable

From 59.37.172.80 icmp_seq=8 Destination Host Unreachable

From 59.37.172.80 icmp_seq=10 Destination Host Unreachable

From 59.37.172.80 icmp_seq=11 Destination Host Unreachable

From 59.37.172.80 icmp_seq=12 Destination Host Unreachable

From 59.37.172.80 icmp_seq=14 Destination Host Unreachable

From 59.37.172.80 icmp_seq=15 Destination Host Unreachable

From 59.37.172.80 icmp_seq=16 Destination Host Unreachable

 

--- 59.37.172.81 ping statistics ---

19 packets transmitted, 0 received, +12 errors, 100% packet loss, time 17999ms

, pipe 3

[root@localhost ~]# arp -a

? (59.37.172.1) at 00:23:89:4D:29:12 [ether] on eth0

? (59.37.172.81) at on eth0

[root@localhost ~]#   

阅读(2504) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~