目录
高级访问控制列表
能够针对数据包的源、目的IP地址、协议类型、源目的端口号等元素进行匹配。
例如下图,若现在需求是,PC1 不可以访问S1,但可以访问S2,基本ACL则无法实现,则需要设置高级ACL
需求1:
PC2无法访问S2,其他流量放行
(以下省略接口的基本配置)
acl 3000
rule 5 deny ip source 192.168.1.2 0.0.0.0
destination 10.1.1.2 0.0.0.0
rule permit ip
int g0/0/0
traffic-filter inbound acl 3000
需求2:
不允许PC2通过域名访问Server2
S2(应用服务器)
S1(域名服务器)
C2
抓包查看DNS用的协议
R1
acl 3000
rule 5 deny udp source 192.168.1.2 0.0.0.0 destination 10.1.1.1 0.0.0.0 destination-port eq 53
rule permit ip
int g0/0/0
traffic-filter inbound acl 3000
配置前
配置后
通过IP依然可以访问
需求3:
不允许员工08:00 to 17:00工作日内访问淘宝
R1
time-range work-time 08:00 to 17:00 working-day #创建时间
acl 3000
rule deny tcp source 192.168.1.2 0.0.0.0 destination 10.1.1.2 0.0.0.0 destination-port eq 80 time-range work-time #创建规则
rule permit ip
int g0/0/0
traffic-filter inbound acl 3000
配置前
配置后
在R1修改时间为下班时间,可以访问
clock datetime 18:17:09 2022-06-14