H3C outside source NAT 华三外部源地址转换 2020-07-03 网络 暂无评论 2581 次阅读 ![H3C-outside-source-nat-A.png](https://blog.moper.net/usr/uploads/2020/07/3936001132.png) 预配置如下: ``` [r1] # sysname r1 # interface Serial1/0 ip address 20.0.0.1 255.255.255.0 nat server protocol tcp global 20.0.0.21 23 inside 10.1.1.1 23 # interface GigabitEthernet0/1 port link-mode route combo enable copper ip address 10.1.1.254 255.255.255.0 # return [r3server] # sysname r3server # telnet server enable # interface GigabitEthernet0/1 port link-mode route combo enable copper ip address 10.1.1.1 255.255.255.0 # ip route-static 0.0.0.0 0 10.1.1.254 # return [r7isp] # sysname r7isp # interface Serial1/0 ip address 20.0.0.100 255.255.255.0 # return ``` 需求场景 外部访问内部资源时,将外部源地址转换为内部地址 公网r7isp (200.0.0.100),访问内网r3server对外提供的WEB服务时,在路由器r1上配置外部源地址转换,将200.0.0.100的源地址转换为10.1.1.100 配置如下: ``` [r1] # interface GigabitEthernet0/1 port link-mode route combo enable copper ip address 10.1.1.254 255.255.255.0 nat outbound name r7isp address-group 10 # acl basic name r7isp rule 0 permit source 20.0.0.100 0 # nat address-group 10 address 10.1.1.100 10.1.1.100 # return ``` 验证:通过在r7isp 使用telnet 命令测试r3server web服务 r7isp上通过telnet 20.0.0.21 进行测试 ![H3C-outside-source-nat-V1-600x203.png](https://blog.moper.net/usr/uploads/2020/07/3691343471.png) r1 通过display nat session verbose 命令进行验证,查看源地址 20.0.0.100 已转换为地址 10.1.1.100 ![H3C-outside-source-nat-V2-763x500.png](https://blog.moper.net/usr/uploads/2020/07/1169477792.png) r3server 通过terminal debugging和debugging telnet client命令开启telnet debug功能,在r7isp上再次telnet 20.0.0.21 进行测试验证 ![H3C-outside-source-nat-V3-600x149.png](https://blog.moper.net/usr/uploads/2020/07/3820755824.png) 转自http://www.itbj.net/h3c-outside-source-nat/ 标签: nat, h3c 本作品采用 知识共享署名-相同方式共享 4.0 国际许可协议 进行许可。