Note: The STUN RFC states: This protocol is not a cure-all for the problems associated with NAT.
- STUN enables a device to find out its public IP address and the type of NAT service its sitting behind.
- STUN operates on TCP and UDP port 3478.
- STUN is not widely supported by VOIP devices yet.
- STUN may use DNS SRV records to find STUN servers attached to a domain. The service name is _stun._udp or _stun._tcp
Definitions (from the RFC)
- STUN Client: A STUN client (also just referred to as a client) is an entity that generates STUN requests. A STUN client can execute on an end system, such as a user's PC, or can run in a network element, such as a conferencing server.
- STUN Server: A STUN Server (also just referred to as a server) is an entity that receives STUN requests, and sends STUN responses. STUN servers are generally attached to the public Internet.
Various types of NAT (still according to the RFC)
- Full Cone: A full cone NAT is one where all requests from the same internal IP address and port are mapped to the same external IP address and port. Furthermore, any external host can send a packet to the internal host, by sending a packet to the mapped external address.
- Restricted Cone: A restricted cone NAT is one where all requests from the same internal IP address and port are mapped to the same external IP address and port. Unlike a full cone NAT, an external host (with IP address X) can send a packet to the internal host only if the internal host had previously sent a packet to IP address X.
- Port Restricted Cone: A port restricted cone NAT is like a restricted cone NAT, but the restriction includes port numbers. Specifically, an external host can send a packet, with source IP address X and source port P, to the internal host only if the internal host had previously sent a packet to IP address X and port P.
- Symmetric: A symmetric NAT is one where all requests from the same internal IP address and port, to a specific destination IP address and port, are mapped to the same external IP address and port. If the same host sends a packet with the same source address and port, but to a different destination, a different mapping is used. Furthermore, only the external host that receives a packet can send a UDP packet back to the internal host.
Closing words (also from the RFC)
14.6 In ClosingThe problems with STUN are not design flaws in STUN. The problems in STUN have to do with the lack of standardized behaviors and controls in NATs. The result of this lack of standardization has been a proliferation of devices whose behavior is highly unpredictable, extremely variable, and uncontrollable. STUN does the best it can in such a hostile environment. Ultimately, the solution is to make the environment less hostile, and to introduce controls and standardized behaviors into NAT. However, until such time as that happens, STUN provides a good short term solution given the terrible conditions under which it is forced to operate.
Standard documents
STUN RFC RFC 3489Update to STUN protocol
STUN standard is currently being reworked in STUN-bisSoftware
- vovida.org has an open source STUN server: vovida.org STUN server
- a Linux open source STUN server is also available here myStun
- a Java STUN library (includes a STUN client): JSTUN
- a Microsoft windows based simple STUN server: miniSipServer
- PJNATH library from pjsip.org project is an Open Source NAT traversal library supporting STUN, TURN, and ICE.
Public STUN servers
- stun.ekiga.net
- stun.fwdnet.net
- stun.ideasip.com
- stun01.sipphone.com (no DNS SRV record)
- stun.softjoys.com (no DNS SRV record)
- stun.voipbuster.com (no DNS SRV record)
- stun.voxgratia.org (no DNS SRV record)
- stun.xten.com
- stunserver.org see their usage policy
- stun.sipgate.net:10000
- numb.viagenie.ca (http://numb.viagenie.ca)
See also
- STUN-bis
- STUN clients: List of SIP Clients (UAs) that support STUN
- NAT and VOIP
- TURN
- ICE
Additional reading
STUN sits along side a number of techniques to achieving NAT traversal, these include TURN, ICE UPnP and Session Border controllers. ICE provides a framework pulls together a number of different techniques: STUN, TURN, RSIP, to allow a client to investigate its environment, however, this flexibility comes at a cost - additional client complexity.- The White Paper on NAT traversal from Newport Networks summarises the pros and cons of different NAT traversal techniques. White Paper - NAT Traversal for Multimedia over IP Services
Page Changes
SIP supported STUNs
AFAIK, www.whatismyip.com supports RFC3489 and can receive and send STUN request from a device. The fact that they can throw you back your publick IP is that they have a STUN at their backend that can automaticaly reply your STUN request. Same as with www.ipchicken.com and www.showmyip.com Many SIP ATA devices today such as ATCOM, xten.de, Chinarobi uses www.whatismyip.com I also heard its SIP friendly.
Re: Re: STUN is now widely supported
Re: STUN is now widely supported
STUN is now widely supported
sorry
stund
It appears that the proper place to get stund from is now http://stun.sourceforge.net