3大厂家端口回流处理方案

华为端口回流解决方法 (内网用户通过域名或公网IP访问内部服务器的解决办法)
在这里插入图片描述
isp R4路由配置:
dis current-configuration
[V200R003C00]

dhcp enable

interface GigabitEthernet0/0/0
ip address 3.3.3.1 255.255.255.0

interface GigabitEthernet0/0/1
ip address 9.9.9.9 255.255.255.0
dhcp select interface

return

公司出口路由器R5配置:
dis current-configuration
[V200R003C00]

acl number 2000
rule 5 permit source 192.168.0.0 0.0.0.255

acl number 3000 //用于解决端口回流acl
rule 5 permit ip source 192.168.0.0 0.0.0.255 destination 3.3.3.8 0

nat address-group 1 3.3.3.5 3.3.3.6 /公司申请的公司地址池

interface GigabitEthernet0/0/0
ip address 3.3.3.3 255.255.255.0
nat static protocol tcp global 3.3.3.8 www inside 192.168.0.100 www
//映射内部服务器到申请的外网地址3.3.3.8 这个地址是公司申请的单独一个公网地址
nat outbound 2000 address-group 1 //内网用户上网

interface GigabitEthernet0/0/1 //出口路由的内网口
ip address 2.2.2.1 255.255.255.0
nat server protocol tcp global 3.3.3.8 www inside 192.168.0.100 www //解决端口回流
nat outbound 3000 //解决端口回流

ip route-static 0.0.0.0 0.0.0.0 3.3.3.1
ip route-static 192.168.0.0 255.255.255.0 2.2.2.2

return

核心交换机配置 :
dis current-configuration

sysname Huawei

vlan batch 2 100

dhcp enable

diffserv domain default

drop-profile default

ip pool vlan1
gateway-list 192.168.0.1
network 192.168.0.0 mask 255.255.255.0

interface Vlanif1
ip address 192.168.0.1 255.255.255.0
dhcp select global

interface Vlanif2
ip address 2.2.2.2 255.255.255.0

interface MEth0/0/1

interface Eth-Trunk1
port link-type trunk
port trunk allow-pass vlan 2 to 4094

interface GigabitEthernet0/0/1
eth-trunk 1

interface GigabitEthernet0/0/2
eth-trunk 1

interface GigabitEthernet0/0/3
port link-type access
port default vlan 2

ip route-static 0.0.0.0 0.0.0.0 2.2.2.1

华为防火墙端口回流处理方法:
在这里插入图片描述

出口是easy-ip做法:
nat server 0 protocol tcp global 12.1.1.1 www inside 10.0.0.200 www

nat-policy
rule name out_inter
destination-address 10.0.0.200 0.0.0.0
action source-nat easy-ip
rule name nat1
source-zone trust
destination-zone untrust
source-address 10.0.0.0 mask 255.255.255.0
action source-nat easy-ip

出口是地址池做法:
nat server 0 protocol tcp global 12.1.1.1 www inside 10.0.0.200 www

nat address-group 1 12.1.1.1 12.1.1.1 //假如只有一个公网地址
nat-policy zone trust
policy 1
policy destation 10.0.0.200 0.0.0.0
action source-nat
address-group 1

锐捷(正常端口映射再尾部加上permit-inside)

ip nat inside source static tcp 服务器ip 80 公网ip 80 permit-inside

h3c

在出口路由器下联的内网口上打上;:
nat hairpin enable

  • 0
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
华为防火墙的端口回流配置主要涉及到两种技术:端口映射和NAT。下面分别介绍: 1. 端口映射 端口映射是一种将外部网络中的IP地址和端口映射到内部网络中的IP地址和端口的技术。它的主要作用是将内部网络的服务暴露到公网上,从而可以实现远程访问。配置步骤如下: (1)创建端口映射规则 [Huawei-firewall] firewall interzone trust untrust [Huawei-firewall-interzone-trust-untrust] port-mapping server enable [Huawei-firewall-interzone-trust-untrust] port-mapping server 10.1.1.1 protocol tcp in-port 80 out-port 8080 其中,10.1.1.1为内部服务器的IP地址,80为内部服务器的端口号,8080为映射到公网上的端口号。 (2)配置安全策略 为了保证安全,需要在防火墙中配置安全策略,限制访问。例如,可以设置只允许特定的IP地址访问: [Huawei-firewall] firewall interzone trust untrust [Huawei-firewall-interzone-trust-untrust] security-policy from zone trust to zone untrust policy allow source 1.1.1.1 0 destination port-mapping server 其中,1.1.1.1为允许访问的IP地址。 2. NAT NAT是一种网络地址转换技术,它可以将内部网络中的私有IP地址转换成公网IP地址,从而实现对外通讯。配置步骤如下: (1)创建NAT地址池 [Huawei-firewall] nat address-group 1 1.1.1.1 1.1.1.10 其中,1.1.1.1至1.1.1.10为公网IP地址。 (2)配置NAT规则 [Huawei-firewall] firewall interzone trust untrust [Huawei-firewall-interzone-trust-untrust] nat server global 1.1.1.1 inside 10.1.1.1 其中,1.1.1.1为公网IP地址,10.1.1.1为内部服务器的IP地址。 (3)配置安全策略 同样需要配置安全策略,限制访问: [Huawei-firewall] firewall interzone trust untrust [Huawei-firewall-interzone-trust-untrust] security-policy from zone trust to zone untrust policy allow source 1.1.1.1 0 destination nat server 其中,1.1.1.1为允许访问的IP地址。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

项目工程师余工

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

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

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

打赏作者

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

抵扣说明:

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

余额充值