华为CLI实验-配置旁路检测时的安全策略

CLI举例:配置旁路检测时的安全策略

举例说明当FW作为旁路检测设备时,如何配置安全策略。

组网需求

图1所示,企业内网通过路由器Router连接到Internet。FW作为旁路检测设备,对通过Router的流量进行内容安全检测。

图1 旁路检测组网图

配置思路
  1. FW作为旁路检测设备时,需要将检测接口GE1/0/1设置为二层接口,并将检测接口与交换机相连。交换机通过镜像将流量上送到FW上检测。
  2. 在检测接口上配置旁路检测功能,使FW只检测而不转发流量。
  3. 配置安全策略,引用需要的安全配置文件,对流量进行对应的内容安全检测。
    • FW只有一个接口接收镜像流量或者多个接口接收镜像流量但针对各个接口接收的流量配置相同的安全策略时,可以将接口加入任何安全区域,将安全策略的源安全区域和目的安全区域配置成any。
    • FW有多个接口接收镜像流量,且要针对各个接口接收的流量配置不同的安全策略时,需要将接口加入不同的安全区域,将安全策略的源安全区域和目的安全区域配置成检测接口所在的安全区域。
操作步骤
  1. 配置接口和安全区域,完成网络基本参数配置。

    javascript 复制代码
    对于带VLAN Tag的流量,除了要在二层接口执行命令行port trunk allow-pass vlan,还需要在FW上创建对应的VLAN。
    
    <FW> system-view
    [FW] vlan 10
    [FW-vlan10] quit
    [FW] interface GigabitEthernet 1/0/1
    [FW-GigabitEthernet1/0/1] portswitch
    [FW-GigabitEthernet1/0/1] port link-type trunk
    [FW-GigabitEthernet1/0/1] port trunk allow-pass vlan 10
    [FW-GigabitEthernet1/0/1] detect-mode tap
    [FW-GigabitEthernet1/0/1] quit
    [FW] firewall zone untrust
    [FW-zone-untrust] add interface GigabitEthernet 1/0/1
    [FW-zone-untrust] quit
  2. 配置旁路检测时的安全策略。

    javascript 复制代码
    [FW] security-policy
    [FW-policy-security] rule name policy_sec_bypass_detection
    [FW-policy-security-rule-policy_sec_bypass_detection] source-zone untrust
    [FW-policy-security-rule-policy_sec_bypass_detection] destination-zone untrust
    [FW-policy-security-rule-policy_sec_bypass_detection] action permit
    [FW-policy-security-rule-policy_sec_bypass_detection] profile av default
    [FW-policy-security-rule-policy_sec_bypass_detection] profile ips default
    [FW-policy-security-rule-policy_sec_bypass_detection] policy logging

    本举例的内容安全检测选择了反病毒和入侵防御的缺省配置文件,您可以根据实际需求,配置和选择其他多种安全配置文件。

配置脚本
javascript 复制代码
#
vlan batch 10
#                                                                               
interface GigabitEthernet1/0/1                                                  
 portswitch                                                                     
 undo shutdown                                                                  
 port link-type trunk                                                           
 port trunk allow-pass vlan 10                                       
 detect-mode tap                                                                
#                                                                               
firewall zone untrust                                                           
 set priority 5                                                                 
 add interface GigabitEthernet1/0/1                                             
#                                                                               
security-policy                                                                 
 rule name policy_sec_bypass_detection                                          
  policy logging
  source-zone untrust                                                           
  destination-zone untrust                                                      
  profile av default                                                            
  profile ips default                                                           
  action permit     
相关推荐
wang090712 分钟前
网络协议之为什么要分层
网络·网络协议
AdaTina25 分钟前
Docker的分解分析
运维·docker·容器
donglxd34 分钟前
老电脑优化全知道(包括软件和硬件优化)
运维·windows·系统安全
EasyDSS1 小时前
EasyCVR视频汇聚平台助力大型生产监控项目摄像机选型与应用
网络·人工智能·音视频
群联云防护小杜2 小时前
云服务器被黑客攻击应急响应与加固指南(上)
运维·服务器·人工智能·tcp/ip·自动化·压力测试
老秦包你会2 小时前
Linux课程五课---Linux进程认识1
linux·运维·服务器
等猪的风2 小时前
openwrt作旁路由时的几个常见问题 openwrt作为旁路由配置zerotier 图文讲解
运维·服务器·网络
互联网搬砖老肖2 小时前
运维打铁:域名详解及常见问题解决
运维·github
Suckerbin2 小时前
第十四章-PHP与HTTP协议
开发语言·http·php
千码君20162 小时前
什么是数据链路层的CRC检测以及为什么要放到帧尾?
服务器·网络·网络协议·以太网·奇偶校验·crc检测·以太网帧