Concepts / Address translation

Address translation

STUN

Also called Session Traversal Utilities for NAT, server-reflexive address, public address discovery, UDP 3478, rendezvous server

A server that tells a device behind NAT the public address and port its packets arrive from.

A device cannot see its own NAT mapping. It sends a UDP request to a STUN server (RFC 8489, port 3478), which answers with the source address and port it saw: the server-reflexive address. The device passes that to its peer through a signalling server, and the two try to reach each other there. The answer is only worth anything if the NAT keeps the same mapping for other destinations.

See it on real machines

Learn it on real machines.

Every lab is a small network of real Linux machines in your browser. Start with a free account: Google or email, no card.

Open this lab