Home / Companies / Tailscale / Blog / Post Details
Content Deep Dive

How NAT traversal works

Blog post from Tailscale

Post Details
Company
Date Published
Author
David Anderson
Word Count
8,931
Language
-
Hacker News Points
-
Summary

The blog post delves into the complexities of Network Address Translation (NAT) traversal, a crucial aspect of establishing peer-to-peer connections across networks with NAT devices and firewalls. It explains how Tailscale, among other technologies, uses various techniques to overcome the challenges posed by NATs, such as using UDP protocols, STUN servers, and coordination servers to manage IP and port information. The post highlights the intricacies of stateful firewalls and NATs, differentiating between types like Endpoint-Independent Mapping and Endpoint-Dependent Mapping, and discusses the limitations of traditional NAT traversal techniques. It introduces the concept of using relays as a fallback when direct connections fail and emphasizes the importance of the Interactive Connectivity Establishment (ICE) protocol, which simplifies connectivity by simultaneously trying multiple pathways. The discussion also touches upon the potential of IPv6 to mitigate some of these issues, although it is not yet universally adopted. Overall, the post provides a comprehensive overview of the strategies and challenges involved in achieving reliable NAT traversal for seamless internet communication.