How Mesh VPNs Traverse Firewalls Without Port Forwarding
Overlay networks like Tailscale and NetBird use UDP hole punching and coordination servers to build zero-configuration WireGuard meshes. Here is how they bypass NAT to connect devices directly.
By Hui Lin
- Managed SaaS Advocates
- Value the convenience of offloading control plane operations to a vendor.
- Open-Source Operators
- Prioritize self-hosting and full ownership of the network infrastructure.
- Protocol Purists
- Prefer raw WireGuard configurations to avoid the overhead of a coordination layer.
Why it matters
Traditional VPNs route all traffic through a central gateway, adding latency and creating a single point of failure. Mesh networks allow devices to communicate directly from anywhere, lowering latency and removing the need to expose open ports to the public internet.
Connecting a laptop at a coffee shop to a home server used to require a specific sequence of network chores. An administrator had to log into a router, assign a static IP address, and manually open UDP port 51820 to the public internet so a WireGuard tunnel could connect. If the server sat behind a carrier-grade NAT, or if the coffee shop blocked outbound VPN ports, the connection simply failed.
Today, overlay networks like Tailscale and NetBird connect those same devices in seconds with zero router configuration. As MakeUseOf noted in a recent evaluation, these tools allow users to forget the tunnel entirely. They build a peer-to-peer mesh over the WireGuard protocol, assigning each device an IP address in the 100.64.0.0/10 private subnet. The devices communicate directly, bypassing firewalls and Network Address Translation (NAT) boundaries without requiring a single forwarded port.[1][3]
The obstacle these tools overcome is the stateful firewall. When a device on a local network requests a webpage, the router's NAT creates a temporary mapping that allows the server's response to return through the same port. However, any incoming packet that does not match an existing outbound request is dropped. When two devices behind different NATs try to connect, both firewalls block the incoming traffic because neither has seen an outbound request to the other.[2]
Mesh VPNs solve this using a coordination server, which acts as a control plane that introduces the devices. As ServerSide notes, Tailscale is essentially WireGuard plus everything WireGuard deliberately leaves out. The coordination server handles key distribution and peer discovery, but it does not route the actual data. It simply tells each device where the other is located.
To find those locations, the clients use Session Traversal Utilities for NAT (STUN). A device sends a packet to a public STUN server, which replies with the public IP address and port the packet originated from. The device then shares this public mapping with the coordination server, which distributes it to the rest of the mesh network.[2]
To find those locations, the clients use Session Traversal Utilities for NAT (STUN).
With the public addresses known, the clients execute a technique called UDP hole punching. Both devices fire UDP packets at each other's public IP address simultaneously. The first packets are often dropped by the receiving firewall, but the act of sending them creates an outbound stateful mapping on the sender's router. When the next packets arrive, the router recognizes them as a response to the outbound traffic and lets them through. The hole is punched, and a direct WireGuard tunnel is established.[2]
This direct connection is highly reliable. Tailscale reports that internal metrics show success rates for direct NAT traversal well north of 90 percent in typical conditions. Once the tunnel is up, the coordination server steps out of the way. As ServerSpace explains, even if the management server goes down, existing connections keep working. Only new device registration and policy updates break.[2][3]
When firewalls are too strict, such as with symmetric NATs that randomize ports for every connection, hole punching fails. In these cases, the networks fall back to relay servers. Tailscale uses its own Designated Encrypted Relay for Packets (DERP) network, while NetBird uses Traversal Using Relays around NAT (TURN). The traffic remains end-to-end encrypted by WireGuard, but it takes an extra hop through a public server, which adds latency.
While the underlying mechanics are similar, the products diverge in their architecture and licensing. Tailscale uses an optimized userspace WireGuard implementation and keeps its coordination server proprietary, though a community project called Headscale allows for self-hosting. NetBird, which raised an 8.5 million euro Series A in early 2026, is fully open-source under the BSD-3 license and defaults to the Linux kernel WireGuard module when available.
The result is a network architecture that shifts security away from the physical perimeter. By abstracting away the complexity of NAT traversal and key management, these tools allow administrators to enforce access policies based on device identity rather than network location, turning any internet connection into a secure local LAN.[3]
Where opinion splits
The Managed SaaS View
Prioritizes ease of use and zero-maintenance infrastructure.
Advocates for managed platforms like Tailscale argue that the control plane is undifferentiated heavy lifting. Running coordination servers, maintaining global relay nodes for NAT fallback, and managing SSO integrations require dedicated operational time. By offloading the control plane to a SaaS provider, teams can deploy a zero-trust network in an afternoon and focus entirely on defining access policies rather than maintaining infrastructure.
The Self-Hosted View
Prioritizes data sovereignty and open-source control.
Proponents of self-hosted meshes like NetBird and Headscale argue that network infrastructure should not depend on a third-party vendor's uptime or pricing model. Because the coordination server dictates which devices can join the network, keeping it in-house ensures complete control over the cryptographic keys and access logs. This approach is particularly favored by organizations with strict data residency requirements or those running air-gapped environments.
The Traditional VPN View
Prioritizes centralized inspection and perimeter defense.
Network administrators managing legacy infrastructure often prefer traditional hub-and-spoke VPNs because they force all traffic through a single gateway. This centralized choke point makes it easier to deploy deep packet inspection, intrusion detection systems, and unified firewall rules. While it adds latency and creates a single point of failure, it aligns with older compliance frameworks that mandate perimeter-based traffic monitoring.
Sources
[1]MakeUseOfManaged SaaS AdvocatesI ran NetBird, Tailscale, and WireGuard side by side, and the winner wasn't the most popular one
Read on MakeUseOf →
[2]Tailscale BlogHow NAT traversal works
Read on Tailscale Blog →
[3]ServerSpaceOpen-Source OperatorsNetBird vs WireGuard, Tailscale, and OpenVPN
Read on ServerSpace →
Comments
More in Guides
See all →Acoustic Engineering
Active Noise Cancellation: How Phase Inversion and the Superposition Principle Silence Low-Frequency Sound
6 sources
Materials Science
Wöhler Curve and the Endurance Limit: How Stress Cycles Determine the Fatigue Life of Steel
6 sources
3D Printing Materials
PLA Creep in 3D Printing: Why Structural Parts Deform Under Continuous Load
7 sources
Emergency Prep
How to Use Power Tool Batteries as Emergency Blackout Power
4 sources
Every angle. Every day.
Get Guides stories with full source coverage and perspective breakdowns delivered to your inbox.




