华为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     
相关推荐
sunfove2 小时前
光网络的立交桥:光开关 (Optical Switch) 原理与主流技术解析
网络
HIT_Weston2 小时前
93、【Ubuntu】【Hugo】搭建私人博客:面包屑(一)
linux·运维·ubuntu
cuijiecheng20183 小时前
Linux下Beyond Compare过期
linux·运维·服务器
喵叔哟3 小时前
20.部署与运维
运维·docker·容器·.net
HIT_Weston3 小时前
92、【Ubuntu】【Hugo】搭建私人博客:侧边导航栏(六)
linux·运维·ubuntu
CodeAllen嵌入式3 小时前
Windows 11 本地安装 WSL 支持 Ubuntu 24.04 完整指南
linux·运维·ubuntu
AI 智能服务3 小时前
第6课__本地工具调用(文件操作)
服务器·人工智能·windows·php
Kevin Wang7274 小时前
欧拉系统服务部署注意事项
网络·windows
min1811234564 小时前
深度伪造内容的检测与溯源技术
大数据·网络·人工智能
汤愈韬5 小时前
Full Cone Nat
网络·网络协议·网络安全·security·huawei