reflect+evalute实现单向访问控制列表的最新实验结果
reflect+evalute实现单向访问控制列表的最新实验结果
interface Vlan12
ip address 10.147.18.92 255.255.255.240
ip access-group in-filter in
ip access-group out-filter out
ip helper-address 10.147.17.193
no ip redirects
standby 12 ip 10.147.18.94
standby 12 priority 150
standby 12 preempt
第一步:
ip access-list extended in-filter
evaluate abcd
deny ip any any
ip access-list extended out-filter
permit ip any any reflect abcd
结果从VLAN12上的客户机ping其它VLAN的机器,提示:
Reply from 10.147.18.92: Destination net unreachable.
第二步:
将上面的访问控制列表改为:
ip access-list extended in-filter
permit ip any any reflect abcd
ip access-list extended out-filter
evaluate abcd
deny ip any any
结果从VLAN12的客户机可以ping通其它vlan的机器,但其它vlan的机器ping不通vlan12的机器.
观察发现,我从vlan12的客户机上ping 其它vlan里面的任何一台机器的话,就会自动生成一条动态度的
access-list,(假如 我从vlan12的机器10.147.18.90 ping vlan1里面的10.147.17.251)
记录如下:
Reflexive IP access list abcd
permit icmp host 10.147.17.251 host 10.147.18.90 (8 matches) (time left 297)
permit udp host 202.96.170.163 eq 8000 host 10.147.18.90 eq 4000 (6 matches) (time left 247)
permit udp host 224.0.0.2 eq 1985 host 10.147.18.93 eq 1985 (155 matches) (time left 299)
Extended IP access list in-filter
permit ip any any reflect abcd
Extended IP access list out-filter
evaluate abcd
deny ip any any (289 matches)
第三步:我想实现功能:vlan12里的机器能访问所有其他vlan,除了vlan 2(10.147.16.0/255.255.255.128)外均
不能访问vlan12:
将访问控制列表改为:
ip access-list extended in-filter
permit ip any any reflect abcd
ip access-list extended out-filter
evaluate abcd
permit ip 10.147.16.0 0.0.0.128 any
deny ip any any
结果一开始几分钟内,除了定义的VLAN2(10.147.16.0/255.255.255.128)外,其它vlan的机器均ping不通vlan 12 的机器
后来就全部PING
不通,和第二次开发步的结果相同
【责编:admin】
--------------------next---------------------