二、配置扩展ACL
tarena-R1(config)#interface fastEthernet 0/0tarena-R1(config-if)#ip address 192.168.1.254 255.255.255.0tarena-R1(config-if)#no shutdowntarena-R1(config-if)#exittarena-R1(config)#interface fastEthernet 0/1tarena-R1(config-if)#ip address 192.168.2.1 255.255.255.0tarena-R1(config-if)#no shutdowntarena-R1(config-if)#exittarena-R1(config)#router riptarena-R1(config-router)#no auto-summarytarena-R1(config-router)#versiontarena-R1(config-router)#network 192.168.1.0tarena-R1(config-router)#network 192.168.2.0tarena-R2(config)#interface fastEthernet 0/1tarena-R2(config-if)#ip address 192.168.2.2 255.255.255.0tarena-R2(config-if)#no shutdowntarena-R2(config-if)#exittarena-R2(config)#interface fastEthernet 0/0tarena-R2(config-if)#ip address 192.168.3.1 255.255.255.0tarena-R2(config-if)#exittarena-R2(config)#router riptarena-R2(config-router)#version 2tarena-R2(config-router)#no auto-summarytarena-R2(config-router)#network 192.168.2.0tarena-R2(config-router)#network 192.168.3.0tarena-R3(config)# interface fastEthernet 0/0tarena-R3(config-if)#ip add 192.168.3.2 255.255.255.0tarena-R3(config-if)#no shutarena-R3(config-if)#exittarena-R3(config)#interface fastEthernet 0/1tarena-R3(config-if)#ip address 192.168.4.254 255.255.255.0tarena-R3(config-if)#no shutdowntarena-R3(config-if)#exittarena-R3(config)#router riptarena-R3(config-router)#version 2tarena-R3(config-router)#no auto-summarytarena-R3(config-router)#network 192.168.3.0tarena-R3(config-router)#network 192.168.4.0
tarena-R1(config)#access-list 100 permit tcp host 192.168.1.1 host 192.168.4.1 eq 80tarena-R1(config)#access-list 100 deny ip host 192.168.1.1 host 192.168.4.1tarena-R1(config)#access-list 100 permit ip 192.168.1.0 0.0.0.255 host 192.168.4.1tarena-R1(config)#interface fastEthernet 0/0tarena-R1(config-if)#ip access-group 100 in
PC>ipconfig
FastEthernet0 Connection:(default port)
Link-local IPv6 Address.........: FE80::2E0:F7FF:FED6:54CC
IP Address......................: 192.168.1.1
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.254
PC>ping 192.168.4.1
Pinging 192.168.4.1 with 32 bytes of data:
Reply from 192.168.1.254: Destination host unreachable.
Reply from 192.168.1.254: Destination host unreachable.
Reply from 192.168.1.254: Destination host unreachable.
Reply from 192.168.1.254: Destination host unreachable.
Ping statistics for 192.168.4.1:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>
PC>ipconfig
FastEthernet0 Connection:(default port)
Link-local IPv6 Address.........: FE80::209:7CFF:FED5:B0E4
IP Address......................: 192.168.1.2
Subnet Mask.....................: 255.255.255.0
Default Gateway.................: 192.168.1.254
PC>ping 192.168.4.1
Pinging 192.168.4.1 with 32 bytes of data:
Reply from 192.168.4.1: bytes=32 time=0ms TTL=125
Reply from 192.168.4.1: bytes=32 time=12ms TTL=125
Reply from 192.168.4.1: bytes=32 time=13ms TTL=125
Reply from 192.168.4.1: bytes=32 time=12ms TTL=125
Ping statistics for 192.168.4.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 13ms, Average = 9ms
tarena-R1#show ip access-lists
Extended IP access list 100
10 permit tcp host 192.168.1.1 host 192.168.4.1 eq www (5 match(es))
20 deny ip host 192.168.1.1 host 192.168.4.1 (4 match(es))
30 permit ip 192.168.1.0 0.0.0.255 host 192.168.4.1 (8 match(es))
转载请附上原文出处链接,原文链接:
https://www.cnblogs.com/baichuanhuihai/p/8277540.html
长按二维码
关注更多精彩
看都看完了,不如点这里试试
推荐站内搜索:最好用的开发软件、免费开源系统、渗透测试工具云盘下载、最新渗透测试资料、最新黑客工具下载……
还没有评论,来说两句吧...