A comprehensive technical guide for deploying Tailscale and ZeroTier on Ubuntu 22.04.5 LTS, including installation, exit node configuration, routing, security hardening, troubleshooting, verification, and technical comparison.
- Introduction
- Architecture Overview
- Prerequisites
- Installing Tailscale
- Configuring Tailscale Exit Node
- Installing ZeroTier
- Configuring ZeroTier as Exit Gateway
- Security Hardening
- Technical Comparison
- Common Use Cases
- Verification & Testing
- Troubleshooting
- References
- Conclusion
Modern mesh VPN solutions such as Tailscale and ZeroTier simplify secure connectivity between devices over untrusted networks.
Both solutions create encrypted overlay networks while abstracting NAT traversal, firewall issues, and remote routing complexity.
- WireGuard-based secure mesh VPN
- Identity-aware networking
- Fast remote SSH access
- Native exit nodes
- ACL-based access policies
- Minimal configuration
- Virtual LAN over Internet
- Layer 2 and Layer 3 overlays
- Advanced routing scenarios
- Homelabs and clusters
- Self-managed virtual network topologies
- WireGuard transport
- DERP relay fallback
- Automatic NAT traversal
- Identity provider authentication
- Native exit nodes
- Subnet routers
- MagicDNS
- ACL policy engine
- SSH integration
- SaaS control plane
- Self-hosted Headscale
Official docs:
- https://tailscale.com/docs/
- https://tailscale.com/kb/1103/exit-nodes/
- https://github.com/juanfont/headscale
- Virtual Ethernet switch
- SD-WAN overlay
- L2 bridging + L3 routing
- Managed routes
- Virtual LAN
- Network segmentation
- Flow rules
- Controller-based management
- ZeroTier Central
- Self-hosted controller
Official docs:
Tested on:
- Ubuntu 22.04.5 LTS
- sudo privileges
- outbound HTTPS access
Recommended packages:
sudo apt update
sudo apt install curl iptables ufw jq net-tools -yOptional tools:
sudo apt install dnsutils traceroute tcpdump -yKernel requirements:
uname -r
sysctl net.ipv4.ip_forwardcurl -fsSL https://tailscale.com/install.sh | shEnable service:
sudo systemctl enable --now tailscaledAuthenticate:
sudo tailscale upVerify:
tailscale status
tailscale ip -4
tailscale versionCheck daemon:
systemctl status tailscaledEnable IP forwarding:
echo 'net.ipv4.ip_forward=1' | sudo tee -a /etc/sysctl.conf
echo 'net.ipv6.conf.all.forwarding=1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -pAdvertise exit node:
sudo tailscale up --advertise-exit-nodeOptional SSH:
sudo tailscale up --advertise-exit-node --sshApprove route in admin console.
Optional subnet router:
sudo tailscale up --advertise-routes=192.168.1.0/24Client usage:
tailscale up --exit-node=<NODE_IP>Install:
curl -s https://install.zerotier.com | sudo bashEnable daemon:
sudo systemctl enable --now zerotier-oneJoin network:
sudo zerotier-cli join <NETWORK_ID>Status:
sudo zerotier-cli info
sudo zerotier-cli listnetworksAuthorize device:
Enable forwarding:
echo 'net.ipv4.ip_forward=1' | sudo tee -a /etc/sysctl.conf
sudo sysctl -pNAT masquerade:
sudo iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADEPersist rules:
sudo apt install iptables-persistent -y
sudo netfilter-persistent saveManaged route:
0.0.0.0/0 via <ZEROTIER_NODE_IP>
Optional IPv6:
::/0 via <ZEROTIER_NODE_IP>
sudo ufw allow ssh
sudo ufw enableRestrict unnecessary services:
sudo systemctl disable apache2
sudo systemctl disable nginxCheck listening ports:
sudo ss -tulpnDisable password SSH:
sudo nano /etc/ssh/sshd_configRecommended:
PasswordAuthentication no
PermitRootLogin no
Restart SSH:
sudo systemctl restart ssh- DNS leaks
- Public gateway exposure
- Incorrect NAT rules
- Broad route advertisement
- Unrestricted ACL policies
| Feature | Tailscale | ZeroTier |
|---|---|---|
| Base protocol | WireGuard | Proprietary overlay |
| Encryption | WireGuard | AES-based |
| Exit node | Native | Manual |
| Layer support | L3 | L2/L3 |
| NAT traversal | Excellent | Good |
| Setup complexity | Low | Medium/High |
| ACL support | Native | Flow rules |
| Self-hosting | Headscale | Native controller |
| Mobile UX | Excellent | Good |
| LAN emulation | No | Yes |
- Personal VPN
- Secure SSH
- Exit node deployment
- Mobile VPN
- Developer remote access
- Corporate identity-aware networking
- Homelabs
- Kubernetes clusters
- Proxmox clusters
- Broadcast-sensitive workloads
- Virtual LANs
- Lab segmentation
curl ifconfig.menslookup google.comip route
ip addrping 8.8.8.8
traceroute 8.8.8.8Restart services:
sudo systemctl restart tailscaled
sudo systemctl restart zerotier-oneLogs:
journalctl -u tailscaled -f
journalctl -u zerotier-one -fCommon issues:
- IP forwarding disabled
- Route not approved
- Missing NAT rule
- Incorrect managed route
Check resolver:
resolvectl statusTemporarily test:
sudo ufw disable- https://tailscale.com/docs/
- https://tailscale.com/download/linux
- https://tailscale.com/kb/1103/exit-nodes/
- https://docs.zerotier.com/
- https://docs.zerotier.com/exitnode/
- https://www.zerotier.com/download/
- https://my.zerotier.com
Best for:
- simplicity
- secure remote access
- identity-aware networking
- native exit nodes
Best for:
- advanced networking
- virtual LANs
- homelabs
- routing flexibility
Summary:
- Tailscale = plug-and-play secure mesh VPN
- ZeroTier = advanced software-defined networking toolkit