MikroTik RouterOS V7.10 Stable加入了新功能endpoint-independent-nat,所以可以通过RouterOS来实现NAT1 FullCone功能了。
ROS配置
1、基本的上网配置,pppoe设置,masquerade上网设置等等,这边就不详细介绍了,请看我以前的文章
2、firewall做nat1设置,IP --> Firewall --> NAT,添加2条记录
Chain:srcnat,Protocol:udp,Action:endpoint-independent-nat,out-interface:pppoe-out1
Chain:dstnat,Protocol:udp,Action:endpoint-independent-nat,in-interface:pppoe-out1
/ip firewall nat add action=endpoint-independent-nat chain=srcnat protocol=udp out-interface=pppoe-out1 place-before=0 /ip firewall nat add action=endpoint-independent-nat chain=dstnat protocol=udp in-interface=pppoe-out1 place-before=0
NAT类型测试
看到使用NAT类型测试工具显示FullCone。
ROS V7.10以下版本可以看看我以前的文章《RouterOS实现NAT1 FullCone》
目前有 2 条评论
你好 2025-07-19 15:191楼
麻烦问下我是V7.12.1版本。我照着你的添加了。有用你的命令添加了。一样不行测试,还是显示PortRestrictedCone怎么办啊?是不是必须要公网啊?我又在To Addressses添加了本机IP还是不行。要是添加了本机IP测试通都不通了。评论
星之宇 2025-07-22 05:53
对,一定要有公网IP。回复