本文主要是介绍华为E1000-E防火墙,配置内网服务器NAT,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
背景:
在内网部署好应用服务器提供给外网用户访问,而且也只能是被动的接收外网访问(例如web服务器,ftp服务器),服务器本身是不能访问互联网。
简单拓扑:
一、IP分布
1、内网服务器IP:192.168.37.205
内网服务器提供的端口:22
2、防火墙版本
HRP_M<HSX-FW-2.PT.HB_ZXCN2_E1000-3>display version
19:36:34 2018/03/21
Huawei Versatile Routing Platform Software
Software Version: Eudemon 1000E V100R002C01SPC200 (VRP (R) Software, Version 3.30)
Copyright (C) 2008-2010 Huawei Technologies Co., Ltd.
Quidway Eudemon1000E-U6 uptime is 326 weeks, 0 day, 19 hours, 24 minutes
Patch: V100R002C01SPH201RPU's Version Information:
2048M bytes SDRAM64M bytes FLASH128K bytes NVRAM
PCB Version : VER.B
RPE Logic Version : 005B
Small BootROM Version : 026 Apr 22 2010
Big BootROM Version : 042 Oct 14 2010
Slot1: 2GE (PCB)VER.A (Software)000 (Logic)000 (Board)SUP1E2GE
Slot2: 2GE (PCB)VER.A (Software)000 (Logic)000 (Board)SUP1E2GE
3、防火墙NAT,这里使用公网IP:x.x.x.x3322端口映射<> 192.168.37.205 22,这样当你访问公网IP的3322端口时其实就是访问内网IP的22端口
nat server protocol tcp global x.x.x.x 3322 inside 192.168.37.205 22
4、设置好NAT之后还需设置进入规则,默认是拒绝所有访问的。所以从公网到内网的inbound方向规则,这里使用ACL 3001过滤源和目标地址
firewall interzone trust untrustpacket-filter 3001 inbound
5、高级ACL 3001设置,source 后面的IP地址是用户的公网IP地址,跟配置在防火墙的地址是不一致的。
acl number 3001rule 1 permit tcp source xx.xx.xx.xx 0 destination 192.168.37.205 0 destination-port eq 22
6、查看
HRP_M<HSX-FW-2.PT.HB_ZXCN2_E1000-3>dis cu | in 192.168.37.205
19:21:54 2018/03/21
acl number 3001rule 1 permit tcp source xx.xx.xx.xx 0 destination 192.168.37.205 0 destination-port eq sshnat server protocol tcp global x.x.x.x 3322 inside 192.168.37.205 22
这篇关于华为E1000-E防火墙,配置内网服务器NAT的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!