/mas-desktop-ops:tailscalefrom mas-desktop-ops
Joins devices to a Tailscale mesh, advertises subnet/exit routes, configures MagicDNS, and diagnoses DERP-relayed vs direct WireGuard paths.
Ships in mas-desktop-ops. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Tailscale is a coordination-plane + WireGuard data-plane mesh VPN. Nodes register with a control server (Tailscale SaaS or self-hosted Headscale), exchange keys and ACL policy, then encrypt traffic peer-to-peer. When UDP hole-punching fails (symmetric NAT, locked-down firewalls), encrypted packets fall back through DERP relays (or optional peer relays). Agents should treat route advertisement and admin approval as a double opt-in, treat MagicDNS as an OS DNS integration problem, and never invent auth keys or ACL principals.
┌─────────────────────────────────────────────────────────────┐
│ Tailscale mesh │
│ │
│ Control plane (coord + ACL + MagicDNS names) │
│ ├── Auth / tags / key expiry │
│ ├── autoApprovers for routes & exit nodes │
│ └── Policy: who may reach which tags / CIDRs │
│ │
│ Data plane (WireGuard) │
│ ├── Prefer direct UDP (often ListenPort ~41641) │
│ ├── Else DERP / peer-relay (encrypted WG still) │
│ └── Subnet router / exit node = forward + advertise │
└─────────────────────────────────────────────────────────────┘
Use when
Do not use when
@wireguard.@vault)./etc/sysctl.d/ (net.ipv4.ip_forward=1, IPv6 forwarding as needed); do not rely on a one-shot sysctl -w.tailscale set --advertise-routes=CIDR (or tailscale up …) is incomplete until routes are approved in Admin Console or covered by autoApprovers (re-advertise after policy changes—auto-approvers are not retroactive for already-pending routes).--accept-routes (or UI equivalent) to install advertised subnet routes.tailscale netcheck + tailscale ping — distinguish direct vs via DERP(...) before blaming application latency.systemd-resolved stub symlink (/etc/resolv.conf → stub); use --accept-dns intentionally; on Amazon Linux watch for resolv.conf loops.--snat-subnet-routes=false when the LAN has static routes back to CGNAT/100.x ranges.$TAILSCALE_AUTH_KEY.#!/usr/bin/env bash
# Subnet router bootstrap — credentials via env only
set -euo pipefail
SUBNET_CIDR="${SUBNET_CIDR:-192.0.2.0/24}" # DOCUMENTATION prefix; replace with real LAN
AUTH_KEY="${TAILSCALE_AUTH_KEY:-}"
sudo tee /etc/sysctl.d/99-tailscale.conf >/dev/null <<'EOF'
net.ipv4.ip_forward = 1
net.ipv6.conf.all.forwarding = 1
EOF
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
# firewalld hosts may need: firewall-cmd --permanent --add-masquerade && firewall-cmd --reload
# Prefer nftables/ufw defaults that deny forward unless explicitly allowed.
if ! command -v tailscale >/dev/null; then
curl -fsSL https://tailscale.com/install.sh | sh
fi
if [[ -n "$AUTH_KEY" ]]; then
sudo tailscale up --auth-key="$AUTH_KEY" --advertise-routes="$SUBNET_CIDR"
else
sudo tailscale up --advertise-routes="$SUBNET_CIDR"
fi
echo "Approve routes in Admin Console (or autoApprovers), then on clients:"
echo " sudo tailscale set --accept-routes"
sudo tailscale status
Minimal autoApprovers sketch (Admin Console policy — use tags, not invented emails):
{
"tagOwners": {
"tag:subnet-router": ["autogroup:admin"]
},
"autoApprovers": {
"routes": {
"192.0.2.0/24": ["tag:subnet-router"]
},
"exitNode": ["tag:exit"]
},
"acls": [
{
"action": "accept",
"src": ["autogroup:member"],
"dst": ["192.0.2.0/24:*"]
}
]
}
Validation loop:
tailscale netcheck
tailscale status
tailscale ping --c 5 <peer-or-lan-host>
# Expect: "direct" for healthy LAN/WAN UDP; "via DERP" explains high RTT
ip route | grep -E 'tailscale|100\.'
| Signature | Likely cause | Fix path |
|---|---|---|
High RTT / low throughput; ping shows via DERP | Symmetric NAT or UDP blocked; stuck on relay | Open/allow UDP (often 41641); check netcheck UDP; consider peer relays; accept DERP for hard NAT |
| Subnet advertised but LAN unreachable | Route not approved; client missing --accept-routes; ip_forward=0 | Approve in Machines → Subnets; sysctl forward=1; client tailscale set --accept-routes |
| ACL “connection refused” / timeout to allowed host | Policy dst missing tag/CIDR; wrong port | Diff HuJSON ACL; test with broader rule then tighten |
| MagicDNS works nowhere / intermittent on Linux | resolv.conf fight (DHCP vs tailscaled); not using resolved stub | Symlink stub resolv.conf; restart systemd-resolved + tailscaled; or --accept-dns=false and point *.ts.net at 100.100.100.100 |
| DNS broken after exit node | Exit node DNS overrides split DNS | Enable nameserver “Use with exit node” in Admin DNS, or adjust exit usage |
| Windows TUN / Wintun errors | Conflicting VPN filter drivers | Remove conflicting adapters; restart Tailscale service |
| Route approval never auto-applies after ACL edit | autoApprovers not retroactive | Remove/re-advertise routes after policy change |
tag:ci, tag:prod) over user-owned keys for always-on routers; tags disable key expiry by default.*:* for everyone.tailscale status / admin for expired nodes and unapproved routes in CI/CD jump hosts.@wireguard — raw WG when you own keys/endpoints without Tailscale control plane@nginx / @nginx-hardening — private apps behind Serve or subnet-only listeners@vault — store auth keys / OAuth client secrets for automation@ansible — fleet install of tailscaled + sysctl@github-actions — ephemeral CI nodes with tagged auth keysMANDATORY: Persist IP forwarding for routers/exit nodes. Treat advertise + approve (+ client
--accept-routes) as required steps. Diagnose direct vs DERP before optimizing apps. Never commit or invent Tailscale auth keys; use env/secret references. Fix Linux DNS via resolved/stub patterns rather than silently rewriting/etc/resolv.confforever.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
tailscale, wireguard, mesh-vpn, derp-relay, magicdns, subnet-router
npx claudepluginhub alivirgo/major-ai-skills --plugin mas-desktop-ops2 plugins in one repository ship this exact skill · first indexed Oct 25, 2026
7 skills in this plugin
/brunoCreate version-controlled Bruno API collections, write Bru request files, and run API checks through the Bruno CLI in CI./dockerBuild reproducible container images with BuildKit, wire Compose service graphs with real readiness gates, and debug networking, volumes, and layer-cache failures agents routinely miss./everythingSearch Windows files with Everything and es.exe, integrate the SDK or IPC interface, and troubleshoot NTFS index behavior.Other plugins' skills for the same job