欢迎光临
我们一直在努力

ASA之URL过滤-拒绝与工作无关的网站

实施URL过滤一般分为三个步骤:

1.创建class-map(类映射),识别传输流量

2.创建policy-map(策略映射),关联class-map

3.应用policy-map到街口上

配置如下:

第一层

ciscoasa(config)#access-listtcp_filter1permittcp10.1.1.0255.255.255.0anyeqwww

匹配ACL:

ciscoasa(config)#class-maptcp_filter_class1

ciscoasa(config-cmap)#matchaccess-listtcp_filter1

按照http_url_policy规则检测http流量

ciscoasa(config-cmap)#policy-mapinside_http_url_policy

ciscoasa(config-pmap)#classtcp_filter_class1

ciscoasa(config-pmap-c)#inspecthttphttp_url_policy1

应用到接口上

ciscoasa(config)#service-policyinside_url_policyinterfaceinside

第二层

只要在检查http请求报文包头的host字段的过程中发现url_class1所规定的字段

ciscoasa(config-cmap)#matchrequestheaderhostregexcla
ciscoasa(config-cmap)#matchrequestheaderhostregexclassurl_class1

丢弃该报并记录到日志中

ciscoasa(config)#policy-maptypeinspecthttphttp_url_policy1
ciscoasa(config-pmap)#classhttp_url_class1
ciscoasa(config-pmap-c)#drop-connectionlog

第三层

URL_class1所规定的字段需要匹配正则表达则表达式url1

ciscoasa(config)#class-maptyperegexmatch-anyurl_class1
ciscoasa(config-cmap)#matchregexurl1

赞(0)
【声明】:本博客不参与任何交易,也非中介,仅记录个人感兴趣的主机测评结果和优惠活动,内容均不作直接、间接、法定、约定的保证。访问本博客请务必遵守有关互联网的相关法律、规定与规则。一旦您访问本博客,即表示您已经知晓并接受了此声明通告。