2
# 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".

4
  • It would greatly help if you detail what the network looks like, the network device models (especially the NAT router) and the network device configurations. You can refer to the Network Engineering Question Checklist for guidance, then edit your question to provide the necessary information.
    – Ron Maupin
    Feb 4, 2019 at 16:54
  • I suspect that some STUN servers only have one address available and proper stun test requires two IPs. Insufficiency is misreported as wrong NAT type. But that's just hypothesis, not confirmed.
    – Vi.
    Feb 5, 2019 at 0:31
  • Unfortunately, host/server configurations are off-topic here. You can ask about that on Server Fault for a business network. We can help with NAT configurations for on-topic network devices, e.g. enterprise-grade routers.
    – Ron Maupin
    Feb 5, 2019 at 1:48
  • I installed coturn Debian package and the stun command says Independent Filter. On CentOS, it says the same with stuntman server but with coturn it says Port 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 to Independent Filter? By the way, why do you say Port Dependent Filter is not P2P-friendly? It worked with WebRTC on a WAN.
    – baptx
    Jul 29, 2019 at 18:08

0

Browse other questions tagged or ask your own question.