阿国运维网技术分享平台:桌面运维、网络运维、系统运维、服务器运维(及云服务器),精品软件分享、阿国网络、尽在北京运维网
时间有限,大致写了一下核心:
1、先 创建名为work的时间段,其时间范围为每周工作日的8点到18点。
<Device> system-view
[Device] time-range work(名字自定义) 08:00 to 18:00 working-day
[Device] time-range ceshi(名字自定义08:00 to 18:00 working-day
2、创建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 (在规定时间时间段不能连接服务器 192.168.0.100 服务器地址)
[Device-acl-ipv4-adv-3000] rule deny ip source any destination 192.168.0.100 0
[Device-acl-ipv4-adv-3000] quit
3、应用IPv4高级ACL 3000对接口GigabitEthernet1/0/1出方向上的报文进行过滤。
[Device] interface gigabitethernet 1/0/1
[Device-GigabitEthernet1/0/1] packet-filter 3000 outbound(禁止转出)(inbound 允许转出)
[Device-GigabitEthernet1/0/1] quit
4、配置步骤
禁止某网段上外网
禁止192.168.4.0网段访问ISP网络。
禁止192.168.4.0网段通过交换机0/0/22接口。
[Huawei]acl 2001 //定义一个序号为2001的acl表
[Huawei-acl-basic-2001]rule deny source 192.168.4.0 0.0.0.255 //拒绝来自源地址是192.168.4.0/24的数据包
[Huawei-acl-basic-2001]quit //退出acl编辑模式
[Huawei]interface Ethernet 0/0/22 //进入接口
[Huawei-Ethernet0/0/22]traffic-filter outbound acl 2001 //应用acl表,(outbound代表禁止转出)
可能这不是唯一的操作方法,但是有需要的伙伴可以借鉴!





