STUN

STUN stands for Session Traversal Utilities for NAT.

It is a standard method of NAT traversal used in WebRTC. It is defined in IETF RFC 5389.

At its core, STUN’s purpose is to answer the question “what is my IP address?” It does that by using a STUN server.

In order for a WebRTC client to know its public address, it can send a STUN request to a STUN server asking for its public IP address. The STUN server will reply back with the IP address the request came from, which is effectively a public IP address for the WebRTC client.

With the public address now in the possession of the WebRTC client, it can now share that address with its peer. In some scenarios, through some network architectures and NAT device types, using the public address provided by STUN may not work at all. To that end, STUN is used in conjunction with TURN and ICE.

As a protocol, STUN is lightweight and simple, making the availability of public, free and open STUN servers possible.

 

About WebRTC Glossary

WebRTC Glossary is a collaborative space where users can learn more about WebRTC related terms. Anyone can also modify or add new terms to this glossary, but it requires registration to the site first.