各种ACL配置命令

命名扩展ACL配置
R2(config)#ip access-list extended cisco
R2(config-ext-nacl)#10 permit eigrp any any
R2(config-ext-nacl)#20 permit ip host 1.1.1.1 host 3.3.3.3
R2(config-ext-nacl)#30 permit ip any any
R2(config-ext-nacl)#no 30
R2(config-ext-nacl)#30 deny ip any any
R2(config)#int s0/0
R2(config-if)#ip access-group in
 
向标准acl里添加条目
R2(config)#access-list 10 permit host 1.1.1.1
R2(config)#access-list 10 deny any
R2(config)#ip access-list standard 10
R2(config-ext-nacl)#1 permit eigrp any any
 
基于TCP的ACL
R2(config)#access-list 110 permit eigrp any any
R2(config)#access-list 110 tcp any host 10.1.1.1 established 被建立的 带ack的
R2(config)#access-list 110 deny ip any any
 
R2(config)#int s0/1
R2(config-if)#ip access-group 110 in
 

自反ACL
R2(config)#ip access-list extended outside
R2(config-ext-nacl)#10 permit eigrp any any
R2(config-ext-nacl)#20 permit tcp host 10.1.1.1 host 20.1.1.2 reflect cisco
R2(config-ext-nacl)#30 deny ip any any
R2(config)#ip access-list extended inside
R2(config-ext-nacl)#10 permit eigrp any any
R2(config-ext-nacl)#20 evaluate cisco
R2(config-ext-nacl)#30 deny ip any any
R2(config)#int s0/1
R2(config-if)#ip access-group outside out
R2(config-if)#ip access-group inside in

基于时间的ACL
R2(config)#time-range cisco
R2(config-time-range)#periodic daily 12:00 to 13:00
R2(config)#access-list 101 perimit ip any any time-range cisco

CBAC
R2(config)#access-list 101 permit eigrp any any
R2(config)#access-list 101 deny ip any any
R2(config)#int s1/2
R2(config-if)#ip access-group 101 in
R2(config)#ip inspect name cisco tcp
R2(config)#int s1/3
R2(config-if)#ip inspect cisco in
 
查看:show access-lists cisco
      show ip inspect session

本文出自 “Scrat's Matsuko” 博客,转载请与作者联系!

你可能感兴趣的:(网络,职场,安全,acl,休闲)