Rootop 服务器运维与web架构

h3c路由配置回流 内网通过外网ip加端口访问内部服务

产品型号:MSR830-5BEI
Boot ROM版本:1.41
软件版本:7.1.064 Release 0605P05

# 进入系统视图下

<H3C>system-view
System View: return to User View with Ctrl+Z.

# 查看所有acl

[H3C]show acl all

# 基本acl(这里不用) 注意basic和advanced区别

[H3C]acl basic 2000

# 高级acl(此处用)

[H3C]acl advanced 3001
[H3C-acl-ipv4-adv-3001]rule 0 permit ip source 192.168.0.0 0.0.15.255 # 这里要用反掩码
[H3C-acl-ipv4-adv-3001]exit

[H3C]show acl all
Basic IPv4 ACL 2000, 0 rule,
ACL's step is 5

Advanced IPv4 ACL 3001, 1 rule,
ACL's step is 5
 rule 0 permit ip source 192.168.0.0 0.0.15.255

# 卸载掉acl 2000这条

[H3C]no acl basic 2000
[H3C]show acl all
Advanced IPv4 ACL 3001, 1 rule,
ACLs step is 5
 rule 0 permit ip source 192.168.0.0 0.0.15.255

# 查看当前所有vlan

[H3C]show vlan
 Total VLANs: 1
 The VLANs include:
 1(default)
[H3C]show vlan 1
 VLAN ID: 1
 VLAN type: Static
 Route interface: Configured
 IPv4 address: 192.168.1.1
 IPv4 subnet mask: 255.255.240.0
 Description: VLAN 0001
 Name: VLAN 0001
 Tagged ports: None
 Untagged ports:
 GigabitEthernet0/2 GigabitEthernet0/3
 GigabitEthernet0/4

# 进入vlan1

[H3C]interface Vlan-interface 1 # vlan1是我网关地址
[H3C-Vlan-interface1]nat server protocol tcp global 27.223.85.xxx 1025 inside 192.168.10.23 80 # 内网nat映射
[H3C-Vlan-interface1]nat outbound 3001 # 绑定acl 3001

# 卸载一条vlan中的nat映射

[H3C-Vlan-interface1]no nat server protocol tcp global 27.223.85.xxx 3333 # 后面的内网信息不用写

原创文章,转载请注明。本文链接地址: https://www.rootop.org/pages/4003.html

作者:Venus

专注于 服务器运维与web架构 E-mail:venus#rootop.org

评论已关闭。