最佳答案
参考:
acl advanced 3010
description deny_445
rule 0 permit tcp destination-port eq 445
rule 5 permit tcp destination-port eq 135
rule 10 permit tcp destination-port eq 137
rule 15 permit tcp destination-port eq 138
rule 20 permit tcp destination-port eq 139
acl advanced 3011
rule 0 permit tcp source X.X.X.X 0 destination-por t eq 445
traffic classifier deny_445
if-match acl 3010
traffic classifier permit_445
if-match acl 3011
traffic behavior deny_445
filter deny
accounting packet
traffic behavior permit_445
filter permit
accounting packet
qos policy deny_445
classifier dpermit_445 behavior permit_445
classifier deny_445 behavior deny_445
qos apply policy deny_445 global inbound
(0)
可以通过包过滤实现,具体参考下述吧:
· 某公司内的各部门之间通过Device实现互连,该公司的工作时间为每周工作日的8点到18点。
· 通过配置,允许总裁办在任意时间、财务部在工作时间访问财务数据库服务器,禁止其它部门在任何时间、财务部在非工作时间访问该服务器。
图1-1 ACL典型配置组网图
# 创建名为work的时间段,其时间范围为每周工作日的8点到18点。
<Device> system-view
[Device] time-range work 08:00 to 18:00 working-day
# 创建IPv4高级ACL 3000,并制订如下规则:允许总裁办在任意时间、财务部在工作时间访问财务数据库服务器,禁止其它部门在任何时间、财务部在非工作时间访问该服务器。
[Device] acl advanced 3000
[Device-acl-ipv4-adv-3000] rule permit ip source 192.168.1.0 0.0.0.255 destination 192.168.0.100 0
[Device-acl-ipv4-adv-3000] rule permit ip source 192.168.2.0 0.0.0.255 destination 192.168.0.100 0 time-range work
[Device-acl-ipv4-adv-3000] rule deny ip source any destination 192.168.0.100 0
[Device-acl-ipv4-adv-3000] quit
# 应用IPv4高级ACL 3000对接口GigabitEthernet1/0/1出方向上的报文进行过滤。
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] packet-filter 3000 outbound
[Device-GigabitEthernet1/0/1] quit
配置完成后,在各部门的PC(假设均为Windows XP操作系统)上可以使用ping命令检验配置效果,在Device上可以使用display acl命令查看ACL的配置和运行情况。例如在工作时间:
# 在财务部的PC上检查到财务数据库服务器是否可达。
C:\> ping 192.168.0.100
Pinging 192.168.0.100 with 32 bytes of data:
Reply from 192.168.0.100: bytes=32 time=1ms TTL=255
Reply from 192.168.0.100: bytes=32 time<1ms TTL=255
Reply from 192.168.0.100: bytes=32 time<1ms TTL=255
Reply from 192.168.0.100: bytes=32 time<1ms TTL=255
Ping statistics for 192.168.0.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 1ms, Average = 0ms
由此可见,财务部的PC能够在工作时间访问财务数据库服务器。
# 在市场部的PC上检查财务数据库服务器是否可达。
C:\> ping 192.168.0.100
Pinging 192.168.0.100 with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for 192.168.0.100:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
由此可见,市场部的PC不能在工作时间访问财务数据库服务器。
# 查看IPv4高级ACL 3000的配置和运行情况。
[Device] display acl 3000
Advanced IPv4 ACL 3000, 3 rules,
ACL's step is 5
rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.0.100 0
rule 5 permit ip source 192.168.2.0 0.0.0.255 destination 192.168.0.100 0 time-range work (Active)
rule 10 deny ip destination 192.168.0.100 0
由此可见,由于目前是工作时间,因此规则5是生效的;且由于之前使用了ping命令的缘故,规则5和规则10分别被匹配了4次。
(1)
暂无评论
#
acl advanced 3901
description "deny-勒索病毒"
rule 10 deny tcp source-port eq 135
rule 11 deny tcp source-port eq 137
rule 12 deny tcp source-port eq 139
rule 13 deny tcp source-port eq 445
rule 14 deny tcp source-port eq 3389
rule 20 deny udp source-port eq 135
rule 21 deny udp source-port eq netbios-ns
rule 22 deny udp source-port eq netbios-ssn
rule 23 deny udp source-port eq 445
rule 24 deny udp source-port eq 3389
rule 30 deny tcp destination-port eq 135
rule 31 deny tcp destination-port eq 137
rule 32 deny tcp destination-port eq 139
rule 33 deny tcp destination-port eq 445
rule 34 deny tcp destination-port eq 3389
rule 40 deny udp destination-port eq 135
rule 41 deny udp destination-port eq netbios-ns
rule 42 deny udp destination-port eq netbios-ssn
rule 43 deny udp destination-port eq 445
rule 44 deny udp destination-port eq 3389
#
traffic classifier classifier_1 operator and
if-match acl 3901
#
traffic behavior behavior_1
filter deny
#
qos policy deny
classifier classifier_1 behavior behavior_1
#
qos vlan-policy deny vlan 2018 inbound
qos vlan-policy deny vlan 2018 outbound
(1)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论