2017-11-30  8,825 views 评论

华为USG6000防火墙内网用户通过公网IP访问内部服务器

华为USG6000防火墙内网用户通过公网IP访问内部服务器

操作步骤
1.配置接口IP地址和安全区域,完成网络基本参数配置。

# 配置接口GigabitEthernet 1/0/1的IP地址。
<FW> system-view
[FW] interface GigabitEthernet 1/0/1
[FW-GigabitEthernet1/0/1] ip address 1.1.1.1 24
[http://utsvxa94.bqcrg.cn] quit

# 配置接口GigabitEthernet 1/0/2的IP地址。
[FW] interface GigabitEthernet 1/0/2
[FW-GigabitEthernet1/0/2] ip address 10.2.0.1 24
[FW-GigabitEthernet1/0/2] quit

# 将接口GigabitEthernet 1/0/1加入Untrust区域。
[FW] firewall zone untrust
[FW-zone-untrust] add interface GigabitEthernet 1/0/1
[http://wylfja35.gpztir.cn] quit

# 将接口GigabitEthernet 1/0/2加入DMZ区域。
[FW] firewall zone dmz
[FW-zone-dmz] add interface GigabitEthernet 1/0/2
[http://gpdrqa107.wzwnof.cn] quit

2.配置安全策略。
[FW] security-policy
[FW-policy-security] rule name policy1
[FW-policy-security-rule-policy1] source-zone untrust
[FW-policy-security-rule-policy1] destination-zone dmz
[FW-policy-security-rule-policy1] destination-address 10.2.0.0 24
[FW-policy-security-rule-policy1] action permit
[FW-policy-security-rule-policy1] quit
[http://bpeyqa93.yrsgk.cn] quit
http://sptoba48.vvwop.cn

3.配置NAT地址池。
[FW] nat address-group addressgroup1
[FW-address-group-addressgroup1] mode pat
[FW-address-group-addressgroup1] section 0 1.1.1.11 1.1.1.11
[FW-address-group-addressgroup1] route enable
[FW-address-group-addressgroup1] quit
http://jopgya69.yyefor.cn

4.配置源NAT策略。
[FW] nat-policy
[FW-policy-nat] rule name policy_nat1
[FW-policy-nat-rule-policy_nat1] source-zone dmz
[FW-policy-nat-rule-policy_nat1] destination-zone dmz
[FW-policy-nat-rule-policy_nat1] source-address 10.2.0.6 32
[FW-policy-nat-rule-policy_nat1] action nat address-group addressgroup1
[FW-policy-nat-rule-policy_nat1] quit
[FW-policy-nat] quit
http://qxmtga146.rglbl.cn

5.配置NAT Server功能。
[FW] nat server policy_web protocol tcp global 1.1.1.10 8080 inside 10.2.0.7 www
[FW] nat server policy_ftp protocol tcp global 1.1.1.10 ftp inside 10.2.0.8 ftp

6.开启FTP协议的NAT ALG功能。
[FW] firewall zone dmz
[FW-zone-dmz] detect ftp
[FW-zone-dmz] quit
[FW] firewall interzone dmz untrust
[FW-interzone-dmz-untrust] detect ftp
[FW-interzone-dmz-untrust] quit
http://evfjna81.phhlsv.cn

7.配置缺省路由,使内网服务器对外提供的服务流量可以正常转发至ISP的路由器。
[FW] ip route-static 0.0.0.0 0.0.0.0 1.1.1.254

8.配置黑洞路由,避免FW与http://tcofka10.yfcwba.cn之间产生路由环路。
[FW] ip route-static 1.1.1.10 32 NULL 0

9.在Router上配置到服务器映射的公网地址(1.1.1.10)的静态路由,下一跳为1.1.1.1,使得去服务器的流量能够送往FW。

通常需要联系ISP的网络管理员来配置此静态路由。

原创文章或网络摘录,转载请注明: 转载自守候的时光

本文链接地址: 华为USG6000防火墙内网用户通过公网IP访问内部服务器

打赏

给我留言

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: