配置了acl策略,放通访问10.0.0.1,然后拒绝访问其他终端设备的445端口,通过display acl 可以看到deny 445 端口的规则已经macth了,但仍然有其他设备可以通过广域网端口访问 10.0.0.20 的445端口。
有数据macth,说明acl拒绝445端口生效了,但为什么会有其他设备可以访问10.0.0.20 的 445端口。
拓扑如下
在广域网的端口应用了策略
G0/0
qos apply policy qp_11 inbound
qos apply policy qp_11 outbound
G0/1
qos apply policy qp_11 inbound
qos apply policy qp_11 outbound
策略配置
traffic classifier c_deny_other operator and
if-match acl 3003
#
traffic classifier c_permit_dc operator and
if-match acl 3002
#
traffic behavior b_deny_other
filter deny
#
traffic behavior b_permit_dc
filter permit
#
qos policy qp_11
classifier c_permit_dc behavior b_permit_dc
classifier c_deny_other behavior b_deny_other
#
acl advanced 3002
rule 10 permit ip source 10.0.0.1
rule 20 permit ip destination 10.0.0.1
#
acl advanced 3003
rule 30 deny tcp destination-port eq 445
rule 40 deny udp destination-port eq 445
rule 50 deny tcp source-port eq 445
rule 60 deny udp source-port eq 445
(0)
最佳答案
acl advanced 3003
rule 30 deny tcp destination-port eq 445
rule 40 deny udp destination-port eq 445
rule 50 deny tcp source-port eq 445
rule 60 deny udp source-port eq 445
这里的deny都改成permit。此时的permit不代表放通而代表匹配,deny不代表拒绝而代表不匹配。你用deny的意思就是这个类不匹配tcp destination-port eq 445或不匹配deny udp destination-port eq 445。。。。。。
或者不要用qos,直接在接口下用packet-filter 3003 inbound和packet-filter 3003 outbound做包过滤,这样就不用把permit改成deny了。
(0)
那么behavior的deny,应该是拒绝的意思吧。按你的说法,只要目的端口不是访问445端口的,都会匹配rule30,然后会被behavior的deny拒绝,是吗?
是你的acl命中了,但没用。因为你是流分类里的deny。不命中就是“我们不知道”,命中了就是“我们知道你不用我们带饭”,只有permit命中才是“我们知道你需要我们带饭”,这样别人才会带饭(就是触发流行为)。
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
好的,我试一下,谢谢