動態ACL的配置

網絡拓撲圖

 

R1加訪控列表錢PC1 ping 12.12.12.1  ping 13.13.13.1  ping 13.13.13.2的結果;


R1啓用訪控列表並在被觸發前PC1 ping 12.12.12.1  ping 13.13.13.1  ping 13.13.13.2的結果;


PC1 telnet R1R1上的ACL


OC1 telnet R1 後動態ACl被觸發後的ACL


PC1 telnet R1

 

telnet 後,觸發R1的動態ACL

PC1 ping 12.12.12.1  ping 13.13.13.1  ping 13.13.13.2的結果;

 

配置代碼:

配置端口地址: 

R1(config)#int f0/0

R1(config-if)#ip address 12.12.12.1 255.255.255.0

R1(config-if)#no shutdown

R1(config)#int f0/1

R1(config-if)#ip address 13.13.13.1 255.255.255.0

R1(config-if)#no shutdown

 

 開啓路由功能:

R1(config)#router rip

R1(config-router)#version 2

R1(config-router)#no auto-summary

R1(config-router)#network 12.12.12.0  

R1(config-router)#network 13.13.13.0

R1(config-router)#exit

 配置Telnet並開啓本地認證:

R1(config)#line vty 0 4

R1(config-line)#password cisco

R1(config-line)#login local

R1(config-line)#exit

R1(config)#enable password cisco

 

 開啓用於測試的賬戶:

R1(config)#username cisco password 0 cisco

R1(config)#username sxt password 0 cisco

R1(config)#username cisco autocommand access-enable host time 10

 //將用戶“Cisco”和動態ACL綁定,方便動態ACL臨時爲用戶cisco授權

配置ACL並應用到端口:

R1(config)#$ 100 permit tcp host 12.12.12.2 host 12.12.12.1 eq telnet

R1(config)#access-list 100 dynamic sxt timeout 15 permit ip any any

R1(config)#int f0/0

R1(config-if)#ip access-group 100 in

 PC1與R2的配置不再列出。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章