Address translation
STUN
A server that tells a device behind NAT the public address and port its packets arrive from.
STUN is a protocol that tells a device behind NAT the public address and port its packets arrive from. The device sends a UDP request to a STUN server (port 3478); the server answers with the source address and port it saw, the server-reflexive address. The device gives that to its peer, which sends there. It only helps if the NAT keeps the same mapping for other destinations.
Read next
- NAT traversal Getting traffic through NAT: wrapping protocols in UDP, whose ports NAT can map, and punching holes between peers.
- UDP hole punching Two peers behind NAT sending to each other at once, so each router takes the other's packets for replies.
- NAT mapping and filtering Whether a NAT keeps one public port per inside port (friendly to peer-to-peer) or picks one per destination.