Tailscale Mesh Networking Cheat Sheet¶
Terminal commands for setting up and managing Tailscale mesh networks.
Connectivity & State Management¶
Connect device to the Tailnet using default or saved parameters:
Authenticate non-interactively using a pre-authenticated key:
Reset all flags back to default before applying new parameters:
Update configuration flags (e.g., --accept-routes) without re-authenticating:
Disconnect from the Tailnet while preserving authentication state:
Disconnect and revoke the local device's node authentication key:
List active Tailnet peers, IP addresses, OS, and connection modes (direct vs. DERP):
Output full peer and netmap data in JSON format for scripting:
Display the device’s IPv4 address on the Tailnet (100.x.y.z):
Display the device’s IPv6 address on the Tailnet (fd7a:115c:a1e0::/48):
Exit Node Configuration¶
Offer this device as an exit node for internet traffic routing across the Tailnet:
Route all outbound internet traffic through a specified exit node:
Maintain local LAN access (e.g., local printers/subnets) while using an exit node:
Clear the active exit node and revert to default local internet routing:
Linux IP Forwarding Requirement: Exit nodes and subnet routers require IP forwarding enabled on the host:
echo 'net.ipv4.ip_forward = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
echo 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
Subnet Routing¶
Expose physical LAN subnets (e.g., 192.168.1.0/24,10.0.0.0/16) to the Tailnet:
Accept and route traffic to subnets advertised by other Tailnet peers (default true on iOS/macOS/Windows, false on Linux):
Ignore subnets advertised by other peers and use local routing tables:
Disable Source NAT (SNAT) for subnet routing (requires custom LAN routing setup):
Tailscale SSH¶
Enable the embedded Tailscale SSH server on the device, managed via ACLs:
Authenticate and connect to a peer via Tailscale SSH without managing SSH keys:
Web Exposure & Proxying (Serve & Funnel)¶
Proxy local service to the private Tailnet over HTTPS using automatically provisioned SSL certs:
Display active Tailscale Serve proxy configurations and endpoints:
Clear all active local Tailscale Serve proxy configurations:
Expose a local Web server/port publicly to the open internet via Tailscale relay infrastructure:
View the status and active URLs of publicly funneled services:
File Transfer (Taildrop)¶
Send a file directly to a peer on the Tailnet via Taildrop:
Receive and unpack pending incoming files sent via Taildrop into a specific folder:
Diagnostics & Troubleshooting¶
Perform diagnostics for STUN, UDP blocking, NAT mapping, and locate the nearest DERP server:
Diagnose latency and verify whether the connection to a peer is direct (magicsock) or relayed (DERP):
Fetch an official Let's Encrypt TLS certificate and private key for the local node:
Generate a unique diagnostic log ID to attach to support tickets or GitHub issues:
Check the status of the underlying Tailscale daemon service on systemd-based Linux systems: