NAT lets a home or office network of dozens of devices reach the internet behind a single public IPv4. The router rewrites the source IP and port of outbound packets to its own public address and remembers the mapping in a table; inbound replies are rewritten back. For HTTP and other client-initiated protocols NAT is invisible — the connection always starts from inside, so the mapping always exists when the reply arrives.
For peer-to-peer streaming NAT is the central problem. WebRTC and other UDP-based protocols want two endpoints to talk directly, but neither side can initiate a connection to the other because both are behind NAT. STUN discovers each endpoint's public address by asking a third-party server. ICE coordinates the two sides to swap candidates and try direct connections. TURN provides a fallback relay when direct connection fails — typically 10–20 % of WebRTC sessions in production. RFC 8445 (July 2018) standardised this dance as ICE.
NAT comes in several flavours: full cone (most permissive), restricted cone, port-restricted cone, and symmetric (most restrictive). Symmetric NAT — common on corporate networks and 4G/5G carrier networks — assigns a different external port for each destination, defeating STUN-only hole punching and forcing TURN. Operations teams designing WebRTC services must budget TURN bandwidth for the percentage of sessions that fail to peer directly.
The book · Volume 2 of 7
Video Streaming: A Complete Guide to Video Delivery: From Network Protocols and Transport to Ingest, HLS, and MPEG-DASH
NAT is why two browsers cannot simply send media to each other, and why calls fail on corporate and mobile networks without a TURN fallback. This volume covers NAT in detail, with traversal behaviour, TCP and UDP under real network conditions, QUIC and the transport choices that follow from it. Written by Nikolay Sapunov, CEO at Fora Soft.
WebRTC calls failing behind corporate firewalls and carrier NAT?
We will review your ICE, STUN and TURN setup against your users' networks and return a NAT traversal plan with TURN sizing and connection success targets. 250+ video products shipped since 2005.