动态ACL

访问控制列表:动态ACL(GNS3)

 

(1)拓扑如下

 地址规划如下:

 

 

 

 

(2)使用RIP协议使路由器之间互通

R1(config)# router rip

R1(config-router)# network 10.0.0.0

R1(config-router)# network 14.0.0.0

 

R2(config)# router rip

R2(config-router)# network 10.0.0.0

 

R3(config)# router rip

R3(config-router)# network 10.0.0.0

 

R4(config)# router rip

R4(config-router)# network 14.0.0.0

 

测试网络连通性

R2 ping R4

R4 ping R2

实现全网互通,开始配置网络安全

 

(2)设置vty、enable、console密码(R1为例,R2、R3、R4同)

R1(config)#line vty 0 4

R1(config-line)#password ciscovtypa55

R1(config-line)#login

R1(config)#enable password ciscoenpa55

R1(config)#line console 0

R1(config-line)#password ciscoconpa55

R1(config-line)#login

 

(4)动态ACL的配置

R1(config)#access-list 100 permit tcp any any eq telnet

配置默认不需要认证就可以通过的数据,如telnet

R1(config)#access-list 100 dynamic ccie timeout 2 permit icmp any any

配置认证之后才能通过的数据,如ICMP,绝对时间为2分钟

R1(config)#int f0/0

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

应用ACL

 

测试内网R2 telnet外网R4

 

从结果中看出,telnet不受限制。

 

测试测试内网R2 ping外网R4

内网在没有认证之前,ICMP是无法通过的。

 

(2)配置本地用户数据库

R1(config)#username ccie password cisco

 

(5)配置所有人的用户名具有访问功能

R1(config)#line vty 0 181

R1(config-line)#login local

R1(config-line)#autocommand access-enable

没有加host,那么内网一台主机通过认证之后,所有主机都能访问外网

R1(config-line)#autocommand access-enable host

加了host,就变成谁通过了认证,谁才能访问外网。

 

内网R2认证 并ping外网

当telnet路由器认证成功后ICMP被放行。

 

查看ACL

动态ACL完成。

 

 

posted @ 2019-05-28 18:29  上课睡觉下课撒尿  阅读(148)  评论(2编辑  收藏  举报