# stun -v stun.counterpath.net |& grep '^MappedAddress\|Primary' MappedAddress = 93.84.76.218:20458 MappedAddress = 93.84.76.218:20458 Primary: Independent Mapping, Port Dependent Filter, preserves ports, no hairpin # stun -v stun.wtfismyip.com:3478 |& grep '^MappedAddress\|Primary' MappedAddress = 93.84.76.218:27763 Primary: Independent Mapping, Independent Filter, preserves ports, no hairpin # stun -v stun.l.google.com:19302 |& grep '^MappedAddress\|Primary' MappedAddress = 93.84.76.218:30710 MappedAddress = 93.84.76.218:30711 MappedAddress = 93.84.76.218:30711 MappedAddress = 93.84.76.218:30711 MappedAddress = 93.84.76.218:30711 Primary: Independent Mapping, Independent Filter, preserves ports, no hairpin # stun -v stun.1und1.de:3478 |& grep '^MappedAddress\|Primary' MappedAddress = 93.84.76.218:29003 MappedAddress = 93.84.76.218:29003 Primary: Independent Mapping, Port Dependent Filter, preserves ports, no hairpin # stun -v stun.xtratelecom.es:3478 |& grep '^MappedAddress\|Primary' MappedAddress = 93.84.76.218:28160 MappedAddress = 93.84.76.218:28160 Primary: Independent Mapping, Port Dependent Filter, preserves ports, no hairpin
Why it is sometimes "Port Dependent Filter" (i.e. evil, P2P-unfriendly NAT) and sometimes "Independent Filter" (a "good" NAT)? What is the actual NAT status in this case?
The detected type is consistent if the same STUN server is used.
NAT type
Tested with three carrier-grade NATs (home, work, mobile) - they seem to be port-restricted according to stun
tool when used at appropriate servers, but some servers just always give "Independent".
stun
test requires two IPs. Insufficiency is misreported as wrong NAT type. But that's just hypothesis, not confirmed.stun
command saysIndependent Filter
. On CentOS, it says the same with stuntman server but with coturn it saysPort Dependent Filter
. All installations were done on a VPS using 1 IP address only so I guess that is not the problem and a second IP address is not necessary: stackoverflow.com/questions/7594390/… Can we change a STUN server toIndependent Filter
? By the way, why do you sayPort Dependent Filter
is not P2P-friendly? It worked with WebRTC on a WAN.