许多p2p,cdn,游戏等应用对用户的nat类型有着严格的要求。不合理的nat类型严重影响着网络体验。
这是一个实测可用的nat测试工具。在win7 32bit上可以正常运行,无法手机上运行。无需装任何运行库即可使用。

【重要】内置的stun服务器已经不可用。请手动修改为stun.miwifi.com 端口保持不变(3478)
如何判断NAT测试结果:
NAT有4个类型,它们分别是:NAT1、NAT2、NAT3、NAT4。从 NAT1 至 NAT4 限制越来越多。下面分别讲解。
NAT1: Full Cone NAT,全锥形NAT,这是最宽松的网络环境,你想做什么,基本没啥限制IP和端口都不受限。此种nat可运行cdn业务,并可得到不错的收益。
NAT2: Address-Restricted Cone NAT,受限锥型NAT,相比NAT1,NAT2 增加了地址限制,也就是IP受限,而端口不受限。
NAT3: Port-Restricted Cone NAT,端口受限锥型,相比NAT2,NAT3 又增加了端口限制,也就是说IP、端口都受限。
NAT4: Symmetric NAT,对称型NAT,对称型NAT具有端口受限锥型的受限特性,内部地址每一次请求一个特定的外部地址,都可能会绑定到一个新的端口号。也就是请求不同的外部地址映射的端口号是可能不同的。这种类型基本上就告别 P2P 了。除非具有ipv6地址,否则此种nat无法运行cdn业务。
如何优化NAT类型:
(1)若光猫为路由模式,(光猫拨号),则电脑直连光猫,不再连接自己的路由器。
(2)将光猫改为桥接模式,用路由器拨号。
(3)换用其他运营商。移动宽带常出现局端限制NAT4,无论客户端如何修改也无济于事。联通和电信通常为nat1,有些地区为公网,无nat。
(4)打开IPV6功能,不再纠结NAT类型。
(5)针对学校,企业等网络,不要使用自己的路由器上网,使用交换机直连电脑,减少路由层数。
其他可用stun服务器
以下是搜集到的其他stun服务器,随机抽测了几个,都是可用的。
stun.fitauto.ru:3478
stunserver2024.stunprotocol.org:3478
stun.lineaencasa.com:3478
stun.skydrone.aero:3478
stun.labs.net:3478
stun.taxsee.com:3478
stun.m-online.net:3478
stun.sonetel.com:3478
stun.teamfon.de:3478
stun.nanocosmos.de:3478
stun.mixvoip.com:3478
stun.pure-ip.com:3478
stun.hoiio.com:3478
stun.dls.net:3478
stun.nextcloud.com:443
stun.vomessen.de:3478
stun.qcol.net:3478
stun.futurasp.es:3478
stun.ringostat.com:3478
stun.gntel.nl:3478
stun.streamnow.ch:3478
stun.cellmail.com:3478
stun.business-isp.nl:3478
stun.antisip.com:3478
stun.nextcloud.com:3478
stun.uls.co.za:3478
stun.freeswitch.org:3478
stun.romaaeterna.nl:3478
stun.hot-chilli.net:3478
stun.hicare.net:3478
stun.telnyx.com:3478
stun.root-1.de:3478
stun.lovense.com:3478
stun.myspeciality.com:3478
stun.voipgate.com:3478
stun.sonetel.net:3478
stun.vozelia.com:3478
stun.signalwire.com:3478
stun.epygi.com:3478
stun.voipia.net:3478
stun.stochastix.de:3478
stun.syrex.co.za:3478
stun.cibercloud.com.br:3478
stun.avigora.fr:3478
stun.meowsbox.com:3478
stun.radiojar.com:3478
stun.ixc.ua:3478
stun.bethesda.net:3478
stun.gigaset.net:3478
stun.sewan.fr:3478
stun.siptrunk.com:3478
stun.fathomvoice.com:3478
stun.miwifi.com:3478
stun.dcalling.de:3478
stun.voipxs.nl:3478
stun.sip.us:3478
stun.jabber.dk:3478
stun.plexicomm.net:3478
stun.imp.ch:3478
stun.heeds.eu:3478
stun.easybell.de:3478
stun.axeos.nl:3478
stun.syncthing.net:3478
stun.axialys.net:3478
stun.tula.nu:3478