Tailscale is a mesh virtual private network service that connects laptops, servers, containers and phones into one private network, called a tailnet, using the WireGuard protocol for encryption. In network security and networking, it is classified as a form of zero trust network access, because every connection is authorized by user and device identity rather than by the location of a machine on a trusted internal segment.
Unlike a classic hub-and-spoke VPN concentrator, Tailscale separates a central coordination server, which only distributes keys and policy, from a peer-to-peer data plane in which devices exchange encrypted traffic directly. The result is a network that administrators can deploy in minutes without opening inbound firewall ports, while still enforcing centrally managed access rules.
How Tailscale builds an encrypted mesh
Tailscale builds an encrypted mesh by giving every device its own WireGuard key pair and letting a coordination service tell each node which peers it may reach. The private key never leaves the device; only the public key is uploaded, so the coordination service cannot decrypt traffic even though it orchestrates the network.
When a user signs in, the client authenticates through an external identity provider using OpenID Connect or SAML, registers its public key and receives a network map. That map lists the peers the device is allowed to contact, their public keys, their candidate endpoints and the current access control policy. Each change to the policy or the device list is pushed to clients within seconds.
Each node receives a stable address from the 100.64.0.0/10 range, the carrier-grade NAT block, plus an IPv6 address from a dedicated unique local prefix. Because addresses follow the device rather than the physical network, a server keeps the same tailnet address whether it runs in a data center, a cloud region or a home office.
The table below separates the main components and the role each plays in the architecture.
| Component | Plane | Function |
|---|---|---|
| Coordination server | Control plane | Distributes public keys, network maps and policy |
| Client daemon | Data plane | Runs WireGuard, enforces filters, performs NAT traversal |
| DERP relay | Data plane fallback | Forwards encrypted packets when direct paths fail |
| Identity provider | Authentication | Verifies users through SSO before keys are accepted |
| Policy file | Control plane | Defines who may reach which hosts and ports |
NAT traversal and DERP relays
Tailscale reaches peers behind firewalls through UDP hole punching, a technique in which both sides send packets simultaneously so that their stateful firewalls create matching outbound mappings. Clients discover their public endpoints with a STUN-style probe and exchange those candidates through the coordination service, typically using UDP port 41641 by default.
When both peers sit behind symmetric NAT or a network that blocks UDP entirely, direct paths may fail. In that case traffic flows through Designated Encrypted Relay for Packets servers, known as DERP, over HTTPS on port 443. The relay sees only already encrypted WireGuard packets, so relaying affects latency and throughput but not confidentiality. Clients keep probing and upgrade to a direct path as soon as one becomes available.
The following table summarizes how common network conditions affect the connection path.
| Network condition | Resulting path | Practical effect |
|---|---|---|
| Public IP or easy NAT | Direct UDP | Lowest latency, full throughput |
| Both sides behind cone NAT | Direct after hole punching | Near-direct performance |
| One side behind symmetric NAT | Often direct, sometimes relayed | Variable latency |
| UDP blocked by firewall | DERP relay over port 443 | Higher latency, limited throughput |
Access control and identity in Tailscale
Access in Tailscale is governed by a central policy file written in HuJSON, a JSON dialect that allows comments and trailing commas. Rules grant users, groups or tags access to destination hosts and ports, and the default for an explicit policy is deny everything not allowed. Filters are enforced on the receiving node, so even a compromised peer cannot bypass the rule set at its destination.
Tags assign identity to servers and automated workloads rather than to people, which prevents a service from losing access when its original installer leaves the organization. Additional controls include device approval, which holds new nodes until an administrator accepts them, key expiry that forces periodic reauthentication, and Tailnet Lock, which requires trusted nodes to sign new keys so that a compromised coordination service cannot add rogue devices.
- Subnet routers advertise existing LAN or VPC ranges to the tailnet without installing the client on every host.
- Exit nodes route all internet traffic of selected devices through a chosen node, similar to a full-tunnel VPN.
- MagicDNS gives each device a resolvable name inside the tailnet.
- Tailscale SSH authorizes SSH sessions through the same policy file instead of distributed key files.
Tailscale compared with traditional VPN designs
Tailscale differs from conventional remote access mainly in its topology and trust model. OpenVPN and IPsec deployments usually route every client through a central gateway, while a site-to-site VPN joins entire networks. Tailscale instead links individual devices directly and authorizes each flow by identity, which narrows the blast radius when one endpoint is compromised.
The comparison below places Tailscale beside related approaches that appear in network security architectures.
| Approach | Topology | Trust basis | Typical weakness |
|---|---|---|---|
| Tailscale | Peer-to-peer mesh | User and device identity | Depends on hosted control plane |
| Plain WireGuard | Manually configured peers | Static public keys | Key distribution does not scale |
| OpenVPN gateway | Hub and spoke | Certificates on a concentrator | Gateway bottleneck and exposed port |
| IPsec site-to-site | Network to network | Pre-shared keys or certificates | Broad flat access between sites |
| SASE platform | Cloud points of presence | Identity plus inspection | Higher cost and vendor dependence |
Organizations that cannot rely on a vendor-hosted control plane sometimes run Headscale, an independent open-source implementation of the coordination server. It supports the core mesh features but lacks some commercial functions, and its operators take on full responsibility for availability and patching.
Deployment decisions and common pitfalls
Successful Tailscale deployments start with a written access policy rather than the permissive default that allows every device to reach every other device. Administrators should replace the default rule early, group servers by tags, and restrict subnet routers to the narrowest prefixes required.
The table below lists frequent mistakes, their consequences and the recommended correction.
| Mistake | Consequence | Recommended fix |
|---|---|---|
| Keeping the allow-all default policy | Flat network with lateral movement risk | Write explicit least-privilege rules |
| Disabling key expiry on user laptops | Stolen devices keep access indefinitely | Disable expiry only for tagged servers |
| Advertising a whole /16 via a subnet router | Excessive exposure of internal hosts | Advertise only required subnets |
| Ignoring relayed connections | Poor performance blamed on the network | Allow outbound UDP to improve direct paths |
| Sharing one auth key widely | Untracked devices join the tailnet | Use ephemeral, single-use or tagged keys |
A further limitation is that the tailnet relies on endpoint security. Tailscale authenticates devices and encrypts traffic, but it does not replace patching, endpoint detection or network segmentation inside the hosts themselves, and a compromised laptop with valid access remains a serious threat.
A non-technical view
Tailscale lets computers in different places talk to each other as if they sat in the same office, while keeping everything private. Each device carries its own digital lock and key, and a central service simply tells devices who is allowed to talk to whom.
Think of a building where every room has a badge reader instead of one guarded front door. Getting into the building does not let anyone wander freely; each door checks the badge. That is the key idea of Tailscale: access is decided person by person and device by device, not by being inside the network.
A concrete example
A small software company with 25 employees runs a staging database in a cloud VPC, a build server in a colocation rack and a monitoring dashboard in the office. Previously, an OpenVPN gateway exposed port 1194 to the internet and gave every connected employee access to all three networks.
The operations engineer installs Tailscale on the build server, deploys one subnet router in the cloud VPC that advertises only the database subnet, and tags each server. The policy file allows developers to reach the build server on port 22 and the staging database on port 5432, while only the operations group may open the dashboard. New laptops require administrator approval before joining.
After the migration the company closes its inbound VPN port entirely. Most connections run directly between laptops and servers, a contractor receives access to one host only, and the audit log shows every connection attempt. The attack surface shrinks noticeably without adding hardware.