华为防火墙多外网出口的解决方案(什么是选路)

(华为)数据通信—防火墙— 多出口接入配置按ISP路由选路

华为HiSecEngine USG6000F系列防火墙—典型配置

多出口接入Internet

● Web页面配置:配置按ISP路由选路

● 命令行界面配置:配置按ISP路由选路

一、配置按ISP路由选路(Web页面配置)

1、组网需求

如下图所示,DeviceA作为安全网关部署在网络出口,企业分别从ISP1和ISP2租用一条链路。企业希望访问Server 1的报文从ISP1链路转发,访问Server 2的报文从ISP2链路转发。

2、配置思路

配置接口的IP地址、安全区域。

请提前准备isp1.csv和isp2.csv两个ISP地址库文件,将Server 1的IP地址写入isp1.csv文件中,将Server 2的IP地址写入isp2.csv文件中。ISP地址文件模板可以在“网络 > 路由 > 智能选路”的“运营商地址库”页签中获取。

配置ISP选路功能,使访问Server 1的报文从ISP1链路转发,访问Server 2的报文从ISP2链路转发。

配置基本的安全策略,允许企业内网用户访问外网资源。

3、操作步骤

配置各个接口的IP,并将接口加入相应的安全区域。

选择“网络 > 接口”。

在“接口列表”中,单击GE0/0/3,按如下参数配置。

参考上述操作,配置GE0/0/1和GE0/0/2的接口参数。

为ISP1和ISP2分别创建运营商名称isp1_ifgroup和isp2_ifgroup,并导入对应的ISP地址文件。

选择“网络 > 路由 > 智能选路”,在“运营商地址库”页签,单击“导入”。

新建运营商名称isp1_ifgroup和isp2_ifgroup,并上传对应的地址库文件。

创建ISP路由。

选择“网络 > 路由 > ISP路由”,在“ISP路由列表”中,单击“新建”。

按如下参数新建ISP路由。

配置Trust到Untrust区域的安全策略,允许企业内网用户访问外网资源。假设内部用户网段为/。

选择“策略 > 安全策略 > 安全策略” 。

在“安全策略列表”中,单击“新建安全策略”,按如下参数配置安全策略。

二、配置按ISP路由选路(命令行界面配置)

组网需求与配置思路与Web相同,这里不再赘述。

如下图所示,DeviceA作为安全网关部署在网络出口,企业分别从ISP1和ISP2租用一条链路。1、操作步骤

配置接口的IP地址。

上传ISP地址文件到DeviceA,可以使用SFTP方式进行上传。

为ISP1和ISP2分别创建运营商名称isp1_ifgrp和isp2_ifgrp,并关联对应的ISP地址文件。

[DeviceA] isp name isp1_ifgrp set filename isp1.csv

[DeviceA] isp name isp2_ifgrp set filename isp2.csv

创建ISP路由。

[DeviceA] ip route-isp isp1_ifgrp interface ge 0/0/1 nexthop

[DeviceA] ip route-isp isp2_ifgrp interface ge 0/0/2 nexthop

将接口加入安全区域。

配置Trust到Untrust区域的安全策略,允许企业内网用户访问外网资源。假设内网用户网段为/。

2、检查配置结果

执行display firewall session table verbose destination inside 命令查看访问Server 1的流量出接口为interface1(GE0/0/1)。

执行display firewall session table verbose destination inside 命令查看访问Server 2的流量出接口为interface2(GE0/0/2)。

3、配置脚本

#

sysname DeviceA

#

isp name isp1_ifgrp set filename isp1.csv

isp name isp2_ifgrp set filename isp2.csv

ip route-isp isp1_ifgrp interface GE0/0/1 nexthop

ip route-isp isp2_ifgrp interface GE0/0/2 nexthop

#

interface GE0/0/1

ip address

#

interface GE0/0/3

ip address

#

interface GE0/0/2

ip address

#

firewall zone trust

set priority

add interface GE0/0/3

#

firewall zone untrust

set priority 5

add interface GE0/0/1

add interface GE0/0/2

#

security-policy

rule name policy_sec_trust_untrust

source-zone trust

destination-zone untrust

source-address mask

action permit

#

return

原文链接:,转发请注明来源!