Search code examples
portnatstun

How do i check my nat type using stun? New on this


i want to know my nat type, i was trying with this command "netsh interface Teredo show state" however someone suggested me that i should ie a stun server or client to have a better idea of my nat. But i dont have any idea of this, i just want to have an open nat to play games, so please be patient with me :)

By the way i have enabled DMZ and UPNP on my modem.

Server Name             : win1910.ipv6.microsoft.com.
Client Refresh Interval : 20 seconds
Client Port             : unspecified
State                   : qualified
Client Type             : teredo client
Network                 : unmanaged
NAT                     : symmetric (port)
NAT Special Behaviour   : UPNP: Yes, PortPreserving: Yes

I googled for stun clients or servers but they dont have any info on how to install them or use them, like this one https://github.com/moien007/STUN so if someone can help me with an app that is easy to install or some instructions on how to install a stun server or client please.

Thank you very much.

Edit runing stuntcode.exe got this

Result of CTestDataStream: PASS
Result of CTestReader: PASS
Result of CTestBuilder: PASS
Result of CTestIntegrity: PASS
Result of CTestMessageHandler: PASS
Result of CTestCmdLineParser: PASS
Testing detection for DirectMapping
Testing detection for EndpointIndependent mapping
Testing detection for AddressDependentMapping
Testing detection for AddressAndPortDependentMapping
Testing detection for EndpointIndependentFiltering
Testing detection for AddressDependentFiltering
Testing detection for AddressAndPortDependentFiltering
Result of CTestClientLogic: PASS
Result of CTestRecvFromEx(IPV4): PASS
Result of CTestRecvFromEx(IPV6): PASS
Result of CTestFastHash: PASS
Result of CTestPolling: PASS
Result of CTestAtomicHelpers: PASS
Result of CTestRateLimiter: PASS

Solution

  • You can get a STUN client application for all platforms at https://www.stunprotocol.org (prebuilt EXE clients for Windows and Mac command line apps are up there too!)

    Demonstration:

    C:\StunServer> stunclient.exe stunserver.stunprotocol.org --mode behavior
    Binding test: success
    Local address: 192.168.1.7:52707
    Mapped address: 101.102.33.44:52707
    Behavior test: success
    Nat behavior: Endpoint Independent Mapping
    
    
    C:\StunServer> stunclient.exe stunserver.stunprotocol.org --mode filtering
    Binding test: success
    Local address: 192.168.1.7:39843
    Mapped address: 101.102.33.44:39843
    Filtering test: success
    Nat filtering: Address Dependent Filtering
    
    

    Running the two test modes, reveals Endpoint Independent Mapping and Address Dependent Filtering as described in RFC 5780 for classifying NATs.