Network servers and cables, representing the STUN protocol.

Helping devices discover their public address.

What STUN is

STUN is a protocol that helps a device on a private network discover how it appears to the outside internet. Many devices sit behind a router that uses network address translation, which hides their private addresses behind a shared public one. STUN lets a device find out its public-facing address and port, information it needs to help set up direct connections with other devices.

The problem of hidden addresses

When a device is behind a router performing network address translation, it does not naturally know the public address and port through which the outside world sees it. This can make it hard to establish a direct connection with another device elsewhere on the internet. STUN addresses this by providing a way for the device to learn that public information.

How STUN helps

With STUN, a device contacts a STUN server on the internet, which can observe and report back the public address and port the device appears to be using. Armed with this knowledge, the device can share its public contact details with a peer, making it possible to attempt a direct connection. STUN thus plays a helper role in setting up communication across networks.

STUN in real-time communication

STUN is commonly associated with real-time communication, such as voice and video calls over the internet, where establishing direct connections between participants is desirable for efficiency. In these scenarios, STUN helps each participant discover its public address so the parties can try to connect directly, rather than routing all data through an intermediary when it is not necessary.

STUN is often used alongside related techniques for dealing with network address translation. In some difficult network situations, a direct connection may not be possible even with STUN, and other approaches are needed. Still, STUN is a foundational tool for discovering public addresses, and it frequently works together with other methods to help devices connect across the internet.

Why it matters

STUN is an important protocol for helping devices connect across networks despite address translation. Understanding what STUN is - a way for a device to discover its public-facing address - clarifies part of how real-time internet communication works. For anyone curious about networking, it is a valuable concept to understand.

See also: What is NAT? Explained, What is TURN? Explained.

Sources

Published date reflects the original event date (2025-07-22). This article is original Skillo editorial written from the sources above; facts were verified in September 2026.

Skillo Staff

Skillo Staff

All stories by: Skillo Staff

Leave a Reply