作业13 ACL
所需密码如下
console cisco
enable class
1、
对于 192.168.10.0/24 网络,阻止 telnet 访问所有位置,并且阻止通过 TFTP 访问地址为 192.168.20.254 的企业 Web/TFTP Server。允许所有其它访问。
对于 192.168.11.0/24 网络,允许通过 TFTP 和 Web 访问地址为 192.168.20.254 的企业 Web/TFTP Server。阻止从 192.168.11.0/24 网络发往 192.168.20.0/24 网络的所有其它流量。允许所有其它访问。
第一个 ACL 支持策略的第一部分,配置在 R1 上并应用于 Fast Ethernet 0/0 接口的入站流量。
第二个 ACL 支持策略的第二部分,配置在 R1 上并应用于 Fast Ethernet 0/1 接口的入站流量。
R1
Password: cicso
R1>ena
Password: class
R1#conf t
R1(config)#access-list 101 permit tcp 192.168.10.0 0.0.0.255 host 192.168.20.254 eq www
R1(config)#access-list 101 permit udp 192.168.10.0 0.0.0.255 host 192.168.20.254 eq tftp
R1(config)#access-list 102 permit tcp 192.168.11.0 0.0.0.255 host 192.168.20.254 eq www
R1(config)#access-list 102 permit udp 192.168.11.0 0.0.0.255 host 192.168.20.254 eq tftp
R1(config)#access-list 102 deny ip 192.168.11.0 0.0.0.255 192.168.20.0 0.0.0.255
R1(config)#access-list 102 permit ip any any
R1(config)#int f0/0
R1(config-if)#ip access-group 101 in
R1(config-if)#int f0/1
R1(config-if)#ip access-group 102 in
2、
步骤 3. 评估 R3 LAN 的策略。
阻止 192.168.30.0/24 网络的所有 IP 地址访问 192.168.20.0/24 网络的所有 IP 地址。
允许 192.168.30.0/24 的前一半地址访问所有其它目的地址。
允许 192.168.30.0/24 的后一半地址访问 192.168.10.0/24 网络和 192.168.11.0/24 网络。
允许 192.168.30.0/24 的后一半地址通过 Web 访问和 ICMP 访问所有其余目的地址。
隐含拒绝所有其它访问。
步骤 4. 为 R3 LAN 规划 ACL 实施。
本步骤需要在 R3 上配置一个 ACL 并应用于 FastEthernet 0/0 接口的入站流量
R3
R3>ena
R3#conf t
R3(config)#access-list 103 deny ip 192.168.30.0 0.0.0.255 192.168.20.0 0.0.0.255
R3(config)#access-list 103 permit ip 192.168.30.0 0.0.0.127 any
R3(config)#access-list 103 permit ip 192.168.30.128 0.0.0.127 192.168.10.0 0.0.0.255
R3(config)#access-list 103 permit ip 192.168.30.128 0.0.0.127 192.168.11.0 0.0.0.255
R3(config)#access-list 103 permit tcp 192.168.30.128 0.0.0.127 any eq www
R3(config)#access-list 103 permit icmp 192.168.30.128 0.0.0.127 any
R3(config)#access-list 103 deny ip any any
R3(config)#int f0/0
R3(config-if)#ip access-group 103 in
3、
步骤 5. 评估通过 ISP 进入的 Internet 流量的策略。
仅允许 Outside Host 通过端口 80 与内部 Web Server 建立 Web 会话。
仅允许已建立 TCP 会话进入。
仅允许 ping 应答通过 R2。
步骤 6. 为通过 ISP 进入的 Internet 流量规划 ACL 实施。
本步骤需要在 R2 上配置一个 ACL 并应用于 Serial 0/1/0 接口的入站流量。
R2
R2>ena
R2#conf t
R2(config)#access-list 104 permit tcp host 209.165.202.158 host 192.168.20.254 eq www
R2(config)#access-list 104 permit tcp any any established ## 仅允许已建立 TCP
R2(config)#access-list 104 permit icmp any any ## 仅允许 ping
R2(config)#access-list 104 deny ip any any
R2(config)#int s0/1/0
R2(config-if)#ip access-group 104 in