华为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: V100R002C01SPH201

RPU's Version Information:
2048M     bytes SDRAM
  64M     bytes FLASH
 128K     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 untrust
 packet-filter 3001 inbound

5、高级ACL 3001设置,source 后面的IP地址是用户的公网IP地址,跟配置在防火墙的地址是不一致的。

acl number 3001
 rule 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 3001
 rule 1 permit tcp source xx.xx.xx.xx 0 destination 192.168.37.205 0 destination-port eq ssh
 nat server protocol tcp global x.x.x.x 3322 inside 192.168.37.205 22





  • 2
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

友人a笔记

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值