Skip to content

@tank/tailscale-expert

1.0.0

Tailscale mesh VPN configuration, administration, and troubleshooting.


name: "@tank/tailscale-expert" description: | Tailscale mesh VPN configuration, administration, and troubleshooting. Covers the complete CLI (up, down, status, set, serve, funnel, lock, cert, file, drive, dns, ping, netcheck, bugreport, exit-node), tailnet policy file authoring (HuJSON ACLs, grants, groups, tags, autoApprovers, SSH rules, tests), networking (subnet routers, exit nodes, app connectors, MagicDNS, DERP relays, NAT traversal), security (Tailnet Lock, HTTPS certificates, Tailscale SSH, auth keys, key expiry, ephemeral nodes), service exposure (Serve, Funnel, Taildrop, Drive), and integrations (Docker, Kubernetes operator, cloud-init, Headscale, NAS, CI/CD, tsnet). Synthesizes Tailscale official documentation (2025-2026), WireGuard protocol specification, and production deployment patterns.

Trigger phrases: "tailscale", "tailscale up", "tailscale down", "tailscale status", "tailscale set", "tailscale serve", "tailscale funnel", "tailscale lock", "tailscale cert", "tailscale ssh", "tailscale dns", "tailscale ping", "tailscale netcheck", "tailscale file", "tailscale drive", "tailnet", "tailnet policy", "tailscale ACL", "tailscale grants", "tailscale subnet router", "tailscale exit node", "MagicDNS", "DERP relay", "tailscale docker", "tailscale kubernetes", "tailscale k8s operator", "headscale", "taildrop", "tailscale VPN", "tailscale troubleshooting", "wireguard mesh", "tailscale auth key", "tailnet lock", "tailscale HTTPS", "app connector", "tailscale CI/CD", "tailscale GitHub Actions"

Tailscale Expert

Configure, administer, and troubleshoot Tailscale mesh VPN networks. Covers the complete lifecycle from device enrollment through production hardening, access control, service exposure, and debugging connectivity issues.

Core Philosophy

  1. Verify connectivity first -- Run tailscale status and tailscale netcheck before any configuration change to establish a baseline.
  2. Deny-by-default -- Tailscale ACLs deny all traffic unless explicitly allowed. Start restrictive, open selectively. Use tests in your policy file to validate rules before applying.
  3. Tags for machines, groups for humans -- Tag server-class devices (tag:prod, tag:k8s) and organize users into groups (group:devops). ACLs reference tags/groups, never individual IPs or usernames.
  4. Prefer grants over legacy ACLs -- Grants are the next-generation access control syntax. They support application-layer permissions and all legacy ACL functionality. Use grants for new policies.
  5. Auth keys for automation, interactive login for humans -- Use --auth-key with ephemeral, pre-authorized keys for CI/CD and containers. Reserve interactive SSO login for human-operated devices.

Quick-Start

"I want to connect a device to my tailnet"

StepAction
1Install: curl -fsSL https://tailscale.com/install.sh | sh
2Start: sudo tailscale up
3Authenticate via the URL printed to terminal
4Verify: tailscale status
-> See references/cli-commands.md

"I need to write access control policies"

StepAction
1Open admin console: Access Controls page
2Define groups and tags in policy file
3Write grants (preferred) or ACLs
4Add tests section to validate rules
5Preview changes before saving
-> See references/access-control.md

"I want to expose a local service"

NeedToolCommand
Within tailnet onlyServetailscale serve http://localhost:3000
To the public internetFunneltailscale funnel http://localhost:3000
Share files between devicesTaildroptailscale file cp file.txt targethost:
-> See references/serve-funnel-sharing.md

"Something isn't connecting"

SymptomFirst Step
Can't reach any devicetailscale status -- check if connected
Relay-only connection (slow)tailscale ping <host> -- check if direct path exists
DNS not resolvingtailscale dns status -- check MagicDNS config
Subnet route not workingVerify route is advertised AND approved in admin
Firewall blockingtailscale netcheck -- check UDP/41641 and DERP
-> See references/troubleshooting.md

Decision Trees

Routing Strategy

NeedFeatureReference
Access remote LAN from tailnetSubnet routerreferences/networking-routing.md
Route all internet traffic through a nodeExit nodereferences/networking-routing.md
Route specific domains through tailnetApp connectorreferences/networking-routing.md
Custom DNS for tailnet devicesMagicDNS + split DNSreferences/networking-routing.md

Authentication Method

ScenarioMethod
Human on personal deviceInteractive SSO login (tailscale up)
Server/VM in automationAuth key (--auth-key=tskey-auth-...)
Docker containerAuth key or OAuth client secret via env var
Kubernetes podKubernetes operator with OAuth client
CI/CD runnerEphemeral auth key (auto-cleanup on disconnect)
Headscale (self-hosted)--login-server=https://your-headscale.example.com
-> See references/security-features.md

Service Exposure

AudienceFeaturePort Requirement
Tailnet devices onlytailscale serveNone (WireGuard handles it)
Public internettailscale funnelPorts 443, 8443, 10000 only
File transfertailscale file cpNone
Network drive sharingtailscale drive shareWebDAV via SMB
-> See references/serve-funnel-sharing.md

Anti-Patterns

Don'tDo InsteadWhy
Use *:* in ACLs permanentlyDefine specific ports and protocolsDefeats zero-trust; hard to audit
Hardcode Tailscale IPs in configUse MagicDNS hostnamesIPs change; DNS names are stable
Skip tests in policy fileWrite test assertions for every ACL rulePrevents accidental lockouts
Use reusable auth keys for serversUse ephemeral + pre-authorized keysEphemeral nodes auto-cleanup on disconnect
Run tailscale up with flags repeatedlyUse tailscale set for runtime changesset modifies without re-auth; up may force re-auth
Approve subnet routes without ACLsRestrict who can reach advertised routesApproved routes are visible to everyone by default
Expose services via Funnel without rate limitingAdd application-level auth or rate limitsFunnel is public; Tailscale doesn't rate-limit for you

Reference Files

FileContents
references/cli-commands.mdAll CLI commands organized by category (connectivity, networking, services, diagnostics, administration), key flags for each, common usage patterns, tailscaled daemon configuration
references/access-control.mdTailnet policy file syntax (HuJSON), ACLs vs grants comparison, groups, tags, tagOwners, autoApprovers, SSH rules, hosts, tests, postures, ipsets, nodeAttrs, GitOps workflow
references/networking-routing.mdSubnet routers (setup, HA, split DNS), exit nodes (config, Mullvad), app connectors, MagicDNS, DNS configuration, DERP relay system, NAT traversal, WireGuard fundamentals
references/security-features.mdTailnet Lock (init, sign, manage), HTTPS certificates (Let's Encrypt via tailscale cert), Tailscale SSH (ACL rules, session recording), auth keys (types, rotation), key expiry, ephemeral nodes, shields-up
references/serve-funnel-sharing.mdTailscale Serve (HTTP/HTTPS/TCP proxy, TLS termination), Funnel (public exposure, port restrictions), Taildrop (file transfer), Tailscale Drive (WebDAV shares), node sharing
references/integrations.mdDocker (sidecar, userspace, compose), Kubernetes operator (ingress, egress, Connector CRD), cloud-init, NAS (Synology, QNAP), routers (OpenWrt, pfSense), CI/CD (GitHub Actions), Headscale, tsnet (Go library)
references/troubleshooting.mdFailure map (symptom -> cause -> fix), netcheck output interpretation, bugreport usage, DERP relay debugging, platform-specific issues (macOS, Windows, Linux, mobile), log locations, performance diagnostics

Command Palette

Search skills, docs, and navigate Tank