设为首页收藏本站language→→ 语言切换

鸿鹄论坛

 找回密码
 论坛注册

QQ登录

先注册再绑定QQ

查看: 869|回复: 2
收起左侧

[求助] 小学徒求助,NAT端口映射问题

[复制链接]
发表于 2017-8-26 01:31:40 | 显示全部楼层 |阅读模式
3鸿鹄币
请大咔帮忙看看,感谢感谢!
1.请问下面的防火墙配置是不是有问题?
2.如何验证端口的NAT,是否可以在R3上telnet 10.1.1.18 3001 看R2是否有收到包?
3.如果加入UDP的静态NAT端口3001的转换,如何验证?
ip nat inside source static udp 192.168.1.220 3001 10.1.1.18 3001

我的需求是需要在防火墙上配置一个NAT的端口转换,使外部PC可以访问内部server的3001端口,拓扑请见图片。
R1配置为防火墙
ip nat inside source static tcp 192.168.1.220 3001 10.1.1.18 3001

interface GigabitEthernet0/0
ip address 192.168.1.254 255.255.255.0
ip nat inside

interface GigabitEthernet1/0
ip address 10.1.1.18 255.255.255.252
ip nat outside

R1#show ip nat translations
Pro Inside global      Inside local       Outside local      Outside global
tcp 10.1.1.18:3001     192.168.1.220:3001 ---                ---

R2和R3模拟为PC


1.JPG



最佳答案

查看完整内容

--只要在router上配置了 ip nat inside source static tcp 。。。 这下面的show命令就会出现转换条目。 R2#sh ip nat translations Pro Inside global Inside local Outside local Outside global tcp 202.100.1.20:23 192.168.1.1:23 --- --- --真正测试时有流量,outside就会出现信息。 R2#sh ip nat translations Pro Inside global Inside local Outside local ...
发表于 2017-8-26 01:31:41 | 显示全部楼层
--只要在router上配置了 ip nat inside source static tcp 。。。
这下面的show命令就会出现转换条目。
R2#sh ip nat translations
Pro Inside global      Inside local       Outside local      Outside global
tcp 202.100.1.20:23    192.168.1.1:23     ---                ---

--真正测试时有流量,outside就会出现信息。
R2#sh ip nat translations
Pro Inside global      Inside local       Outside local      Outside global
tcp 202.100.1.20:23    192.168.1.1:23     202.100.1.1:24779  202.100.1.1:24779
tcp 202.100.1.20:23    192.168.1.1:23     ---                ---

--如果你的R2只能开通telnet 23端口,那你只能测试 tcp 23...
做静态NAT时需要ip nat inside source static tcp 192.168.1.220 23 10.1.1.18 23
沙发 2017-8-26 01:31:41 回复 收起回复
回复

使用道具 举报

 楼主| 发表于 2017-8-27 16:39:49 | 显示全部楼层

请大咔帮忙看看吧,十分感谢!
板凳 2017-8-27 16:39:49 回复 收起回复
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 论坛注册

本版积分规则

QQ|Archiver|手机版|小黑屋|sitemap|鸿鹄论坛 ( 京ICP备14027439号 )  

GMT+8, 2024-4-25 06:08 , Processed in 0.064377 second(s), 9 queries , Redis On.  

  Powered by Discuz!

  © 2001-2024 HH010.COM

快速回复 返回顶部 返回列表