[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6ETE7A6S6HC1DCDXZP9M99X":3,"skill-same:01M6ETE7A6S6HC1DCDXZP9M99X":112},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":23,"publishedAt":44,"linkOnly":45,"markdownContent":46,"markdownBody":47,"frontMatter":48,"refName":55,"commitSha":56,"skillDirectory":57,"forksCount":58,"repositoryHtmlUrl":59,"repositoryHomepageUrl":6,"ownerHtmlUrl":60,"ownerBlogUrl":6,"ownerDescription":61,"updatedAt":62,"install":63,"resources":76},"01M6ETE7A6S6HC1DCDXZP9M99X","deploying-tailscale-for-zero-trust-vpn",null,"Deploy and configure Tailscale as a WireGuard-based zero trust mesh VPN with identity-aware access controls, ACLs, and exit nodes for secure peer-to-peer connectivity.","luokai0\u002Fai-agent-skills-by-luo-kai","luokai0","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F266954973?v=4","01M6E16VNT42JB8B3X3254QWJ7","luo kai","01M6E16VTFVP6S5XJF1V1MPV90",14,"Apache-2.0","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn\u002FSKILL.md",[18],{"categoryNo":19,"categoryName":20,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000011","运维与部署","SCENARIO","使用场景",[24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43],"vpn","zero trust","trust","ZeRO","tailscale","deploying tailscale for zero trust vpn","mesh-vpn","as","configure","access","identity-aware","peer-to-peer","mesh","wireguard","ztna","zero-trust","secure","identity","architecture","cybersecurity","2026-11-10 10:12:30",false,"---\nname: deploying-tailscale-for-zero-trust-vpn\ndescription: Deploy and configure Tailscale as a WireGuard-based zero trust mesh VPN with identity-aware access controls, ACLs, and exit nodes for secure peer-to-peer connectivity.\ndomain: cybersecurity\nsubdomain: zero-trust-architecture\ntags: [zero-trust, tailscale, wireguard, mesh-vpn, ztna, peer-to-peer, acl, identity-aware, headscale]\nversion: \"1.0\"\nauthor: mahipal\nlicense: Apache-2.0\n---\n\n# Deploying Tailscale for Zero Trust VPN\n\n## Overview\n\nTailscale is a zero trust mesh VPN built on WireGuard that creates encrypted peer-to-peer connections between devices without requiring traditional VPN servers or complex network configuration. Every connection in a Tailscale network (tailnet) is end-to-end encrypted using WireGuard's Noise protocol framework with Curve25519 key exchange. Tailscale implements zero trust networking by authenticating every connection request through identity providers, enforcing granular Access Control Lists (ACLs), and supporting features like exit nodes, subnet routers, MagicDNS, and Tailscale SSH. For organizations preferring self-hosted infrastructure, Headscale provides an open-source implementation of the Tailscale control server.\n\n\n## When to Use\n\n- When deploying or configuring deploying tailscale for zero trust vpn capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- Identity provider (Okta, Azure AD, Google Workspace, GitHub, or OIDC-compatible)\n- Devices running supported OS (Linux, Windows, macOS, iOS, Android, FreeBSD)\n- Administrative access to configure DNS and firewall rules\n- Understanding of WireGuard protocol fundamentals\n- Network planning documentation for subnet routing requirements\n\n## Architecture\n\n```\n                    Tailscale Coordination Server\n                    (or self-hosted Headscale)\n                           |\n                    Key Distribution\n                    & NAT Traversal\n                           |\n         +-----------------+-----------------+\n         |                 |                 |\n    +----+----+      +----+----+      +----+----+\n    | Node A  |\u003C---->| Node B  |\u003C---->| Node C  |\n    | (Linux) |      | (macOS) |      |(Windows)|\n    +---------+      +---------+      +---------+\n    WireGuard         WireGuard        WireGuard\n    Encrypted         Encrypted        Encrypted\n    P2P Tunnel        P2P Tunnel       P2P Tunnel\n\n    Each node connects directly to every other node.\n    DERP relay servers used only when direct P2P fails.\n```\n\n## Installation and Setup\n\n### Linux Installation\n\n```bash\n# Add Tailscale repository and install\ncurl -fsSL https:\u002F\u002Ftailscale.com\u002Finstall.sh | sh\n\n# Start Tailscale and authenticate\nsudo tailscale up\n\n# Check connection status\ntailscale status\n\n# View assigned IP address\ntailscale ip -4\ntailscale ip -6\n```\n\n### Windows \u002F macOS Installation\n\n```bash\n# Windows: Download from https:\u002F\u002Ftailscale.com\u002Fdownload\u002Fwindows\n# macOS: Install via Homebrew\nbrew install --cask tailscale\n\n# Or download from https:\u002F\u002Ftailscale.com\u002Fdownload\u002Fmac\n```\n\n### Docker Deployment\n\n```yaml\n# docker-compose.yml for Tailscale sidecar\nversion: '3.8'\nservices:\n  tailscale:\n    image: tailscale\u002Ftailscale:latest\n    container_name: tailscale\n    hostname: my-service\n    environment:\n      - TS_AUTHKEY=tskey-auth-xxxxx  # Pre-auth key\n      - TS_STATE_DIR=\u002Fvar\u002Flib\u002Ftailscale\n      - TS_EXTRA_ARGS=--advertise-tags=tag:container\n    volumes:\n      - tailscale-state:\u002Fvar\u002Flib\u002Ftailscale\n      - \u002Fdev\u002Fnet\u002Ftun:\u002Fdev\u002Fnet\u002Ftun\n    cap_add:\n      - net_admin\n      - sys_module\n    restart: unless-stopped\n\nvolumes:\n  tailscale-state:\n```\n\n### Kubernetes Deployment\n\n```yaml\n# Tailscale operator for Kubernetes\napiVersion: v1\nkind: Secret\nmetadata:\n  name: tailscale-auth\n  namespace: tailscale\ntype: Opaque\nstringData:\n  TS_AUTHKEY: \"tskey-auth-xxxxx\"\n---\napiVersion: apps\u002Fv1\nkind: DaemonSet\nmetadata:\n  name: tailscale\n  namespace: tailscale\nspec:\n  selector:\n    matchLabels:\n      app: tailscale\n  template:\n    metadata:\n      labels:\n        app: tailscale\n    spec:\n      containers:\n      - name: tailscale\n        image: tailscale\u002Ftailscale:latest\n        env:\n        - name: TS_AUTHKEY\n          valueFrom:\n            secretKeyRef:\n              name: tailscale-auth\n              key: TS_AUTHKEY\n        - name: TS_KUBE_SECRET\n          value: tailscale-state\n        - name: TS_USERSPACE\n          value: \"true\"\n        securityContext:\n          capabilities:\n            add: [\"NET_ADMIN\"]\n```\n\n## Access Control Lists (ACLs)\n\nTailscale ACLs define who can access what within your tailnet using a declarative JSON format. The default policy is deny-all, making it zero trust by design.\n\n```json\n{\n  \"acls\": [\n    \u002F\u002F Engineering team can access development servers\n    {\n      \"action\": \"accept\",\n      \"src\": [\"group:engineering\"],\n      \"dst\": [\"tag:dev-server:*\"]\n    },\n    \u002F\u002F SRE team can access production infrastructure\n    {\n      \"action\": \"accept\",\n      \"src\": [\"group:sre\"],\n      \"dst\": [\"tag:production:22,443,8080\"]\n    },\n    \u002F\u002F Database access restricted to backend services\n    {\n      \"action\": \"accept\",\n      \"src\": [\"tag:backend\"],\n      \"dst\": [\"tag:database:5432,3306,27017\"]\n    },\n    \u002F\u002F All employees can access internal tools\n    {\n      \"action\": \"accept\",\n      \"src\": [\"group:employees\"],\n      \"dst\": [\"tag:internal-tools:443\"]\n    }\n  ],\n\n  \"groups\": {\n    \"group:engineering\": [\"user@company.com\", \"dev@company.com\"],\n    \"group:sre\": [\"sre@company.com\", \"oncall@company.com\"],\n    \"group:employees\": [\"autogroup:members\"]\n  },\n\n  \"tagOwners\": {\n    \"tag:dev-server\": [\"group:engineering\"],\n    \"tag:production\": [\"group:sre\"],\n    \"tag:backend\": [\"group:sre\"],\n    \"tag:database\": [\"group:sre\"],\n    \"tag:internal-tools\": [\"group:sre\"],\n    \"tag:container\": [\"group:sre\"]\n  },\n\n  \"ssh\": [\n    {\n      \"action\": \"check\",\n      \"src\": [\"group:sre\"],\n      \"dst\": [\"tag:production\"],\n      \"users\": [\"root\", \"admin\"]\n    },\n    {\n      \"action\": \"accept\",\n      \"src\": [\"group:engineering\"],\n      \"dst\": [\"tag:dev-server\"],\n      \"users\": [\"autogroup:nonroot\"]\n    }\n  ],\n\n  \"nodeAttrs\": [\n    {\n      \"target\": [\"autogroup:members\"],\n      \"attr\": [\"funnel:deny\"]\n    }\n  ]\n}\n```\n\n## Exit Nodes and Subnet Routing\n\n### Configure Exit Node\n\n```bash\n# On the exit node machine\nsudo tailscale up --advertise-exit-node\n\n# On the client machine, use the exit node\nsudo tailscale up --exit-node=\u003Cexit-node-ip>\n\n# Verify exit node routing\ncurl ifconfig.me  # Should show exit node's public IP\n```\n\n### Subnet Router Configuration\n\n```bash\n# Advertise local subnets through Tailscale\nsudo tailscale up --advertise-routes=10.0.0.0\u002F24,192.168.1.0\u002F24\n\n# Enable IP forwarding on Linux\necho 'net.ipv4.ip_forward = 1' | sudo tee -a \u002Fetc\u002Fsysctl.conf\necho 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a \u002Fetc\u002Fsysctl.conf\nsudo sysctl -p\n\n# Accept routes on client\nsudo tailscale up --accept-routes\n```\n\n## Tailscale SSH (Zero Trust SSH)\n\nTailscale SSH replaces traditional SSH key management with identity-based access.\n\n```bash\n# Enable Tailscale SSH on a server\nsudo tailscale up --ssh\n\n# Connect using Tailscale SSH (no SSH keys needed)\nssh user@hostname  # Authenticates via Tailscale identity\n\n# Session recording (audit logging)\n# Configure in ACL policy:\n# \"ssh\": [{\"action\": \"check\", \"src\": [...], \"dst\": [...], \"users\": [...]}]\n# \"check\" action requires re-authentication and records sessions\n```\n\n## MagicDNS Configuration\n\n```bash\n# MagicDNS is enabled by default in new tailnets\n# Access devices by hostname instead of IP\nping my-server  # Resolves via MagicDNS\n\n# Custom DNS configuration via admin console\n# Split DNS: route specific domains to internal DNS servers\n# Global nameservers: override default DNS resolution\n```\n\n## Self-Hosted with Headscale\n\n```bash\n# Install Headscale (open-source Tailscale control server)\nwget https:\u002F\u002Fgithub.com\u002Fjuanfont\u002Fheadscale\u002Freleases\u002Flatest\u002Fdownload\u002Fheadscale_linux_amd64\nchmod +x headscale_linux_amd64\nsudo mv headscale_linux_amd64 \u002Fusr\u002Flocal\u002Fbin\u002Fheadscale\n\n# Create configuration\nsudo mkdir -p \u002Fetc\u002Fheadscale\nsudo headscale generate config > \u002Fetc\u002Fheadscale\u002Fconfig.yaml\n\n# Edit config for your environment\n# Key settings:\n#   server_url: https:\u002F\u002Fheadscale.example.com\n#   listen_addr: 0.0.0.0:8080\n#   private_key_path: \u002Fetc\u002Fheadscale\u002Fprivate.key\n#   db_type: sqlite3\n#   db_path: \u002Fvar\u002Flib\u002Fheadscale\u002Fdb.sqlite\n\n# Start Headscale\nsudo headscale serve\n\n# Create user and pre-auth key\nheadscale users create myorg\nheadscale preauthkeys create --user myorg --reusable --expiration 24h\n\n# Connect Tailscale client to Headscale\ntailscale up --login-server https:\u002F\u002Fheadscale.example.com\n```\n\n## Security Hardening\n\n### Key Expiry and Rotation\n\n```bash\n# Set key expiry in admin console (default: 180 days)\n# Force re-authentication periodically\n\n# Disable key expiry for servers (use auth keys instead)\nsudo tailscale up --authkey=tskey-auth-xxxxx\n\n# Pre-auth keys for automated deployment\n# Create ephemeral, single-use keys for CI\u002FCD\n```\n\n### Device Authorization\n\n```json\n{\n  \"nodeAttrs\": [\n    {\n      \"target\": [\"autogroup:members\"],\n      \"attr\": [\n        \"mullvad:deny\",\n        \"funnel:deny\"\n      ]\n    }\n  ],\n  \"autoApprovers\": {\n    \"routes\": {\n      \"10.0.0.0\u002F24\": [\"group:sre\"],\n      \"192.168.0.0\u002F16\": [\"group:sre\"]\n    },\n    \"exitNode\": [\"group:sre\"]\n  }\n}\n```\n\n### Network Lock (Tailnet Lock)\n\n```bash\n# Initialize network lock with signing keys\ntailscale lock init\n\n# Add trusted signing keys\ntailscale lock add nodekey:xxxxx\n\n# All new nodes require signing before joining\n# Prevents unauthorized nodes from joining the tailnet\n```\n\n## Monitoring and Observability\n\n```bash\n# View network status\ntailscale status --json | jq '.Peer | to_entries[] | {name: .value.HostName, online: .value.Online, os: .value.OS}'\n\n# Check connection quality\ntailscale ping \u003Cpeer-ip>\n\n# View network map\ntailscale netcheck\n\n# Audit logs available in Tailscale admin console\n# Integration with SIEM via webhook or API\n```\n\n## Integration Patterns\n\n### Service Mesh Integration\n\n```bash\n# Tailscale as sidecar for service-to-service communication\n# Each service gets a Tailscale identity\n# ACLs enforce service-to-service access policies\n\n# Example: API service can only reach database service\n# ACL: tag:api -> tag:database:5432\n```\n\n### CI\u002FCD Pipeline Integration\n\n```bash\n# Use ephemeral auth keys in CI\u002FCD\nexport TS_AUTHKEY=tskey-auth-xxxxx-ephemeral\ntailscale up --authkey=$TS_AUTHKEY --hostname=ci-runner-$CI_JOB_ID\n\n# Access internal resources during build\u002Fdeploy\n# Node automatically removed when container stops\n```\n\n## References\n\n- [Tailscale Documentation](https:\u002F\u002Ftailscale.com\u002Fkb\u002F)\n- [How Tailscale Works](https:\u002F\u002Ftailscale.com\u002Fblog\u002Fhow-tailscale-works)\n- [Tailscale ACL Documentation](https:\u002F\u002Ftailscale.com\u002Fkb\u002F1018\u002Facls\u002F)\n- [Headscale - Open Source Control Server](https:\u002F\u002Fgithub.com\u002Fjuanfont\u002Fheadscale)\n- [WireGuard Protocol](https:\u002F\u002Fwww.wireguard.com\u002Fprotocol\u002F)\n- [Tailscale SSH](https:\u002F\u002Ftailscale.com\u002Fkb\u002F1193\u002Ftailscale-ssh\u002F)\n","# Deploying Tailscale for Zero Trust VPN\n\n## Overview\n\nTailscale is a zero trust mesh VPN built on WireGuard that creates encrypted peer-to-peer connections between devices without requiring traditional VPN servers or complex network configuration. Every connection in a Tailscale network (tailnet) is end-to-end encrypted using WireGuard's Noise protocol framework with Curve25519 key exchange. Tailscale implements zero trust networking by authenticating every connection request through identity providers, enforcing granular Access Control Lists (ACLs), and supporting features like exit nodes, subnet routers, MagicDNS, and Tailscale SSH. For organizations preferring self-hosted infrastructure, Headscale provides an open-source implementation of the Tailscale control server.\n\n\n## When to Use\n\n- When deploying or configuring deploying tailscale for zero trust vpn capabilities in your environment\n- When establishing security controls aligned to compliance requirements\n- When building or improving security architecture for this domain\n- When conducting security assessments that require this implementation\n\n## Prerequisites\n\n- Identity provider (Okta, Azure AD, Google Workspace, GitHub, or OIDC-compatible)\n- Devices running supported OS (Linux, Windows, macOS, iOS, Android, FreeBSD)\n- Administrative access to configure DNS and firewall rules\n- Understanding of WireGuard protocol fundamentals\n- Network planning documentation for subnet routing requirements\n\n## Architecture\n\n```\n                    Tailscale Coordination Server\n                    (or self-hosted Headscale)\n                           |\n                    Key Distribution\n                    & NAT Traversal\n                           |\n         +-----------------+-----------------+\n         |                 |                 |\n    +----+----+      +----+----+      +----+----+\n    | Node A  |\u003C---->| Node B  |\u003C---->| Node C  |\n    | (Linux) |      | (macOS) |      |(Windows)|\n    +---------+      +---------+      +---------+\n    WireGuard         WireGuard        WireGuard\n    Encrypted         Encrypted        Encrypted\n    P2P Tunnel        P2P Tunnel       P2P Tunnel\n\n    Each node connects directly to every other node.\n    DERP relay servers used only when direct P2P fails.\n```\n\n## Installation and Setup\n\n### Linux Installation\n\n```bash\n# Add Tailscale repository and install\ncurl -fsSL https:\u002F\u002Ftailscale.com\u002Finstall.sh | sh\n\n# Start Tailscale and authenticate\nsudo tailscale up\n\n# Check connection status\ntailscale status\n\n# View assigned IP address\ntailscale ip -4\ntailscale ip -6\n```\n\n### Windows \u002F macOS Installation\n\n```bash\n# Windows: Download from https:\u002F\u002Ftailscale.com\u002Fdownload\u002Fwindows\n# macOS: Install via Homebrew\nbrew install --cask tailscale\n\n# Or download from https:\u002F\u002Ftailscale.com\u002Fdownload\u002Fmac\n```\n\n### Docker Deployment\n\n```yaml\n# docker-compose.yml for Tailscale sidecar\nversion: '3.8'\nservices:\n  tailscale:\n    image: tailscale\u002Ftailscale:latest\n    container_name: tailscale\n    hostname: my-service\n    environment:\n      - TS_AUTHKEY=tskey-auth-xxxxx  # Pre-auth key\n      - TS_STATE_DIR=\u002Fvar\u002Flib\u002Ftailscale\n      - TS_EXTRA_ARGS=--advertise-tags=tag:container\n    volumes:\n      - tailscale-state:\u002Fvar\u002Flib\u002Ftailscale\n      - \u002Fdev\u002Fnet\u002Ftun:\u002Fdev\u002Fnet\u002Ftun\n    cap_add:\n      - net_admin\n      - sys_module\n    restart: unless-stopped\n\nvolumes:\n  tailscale-state:\n```\n\n### Kubernetes Deployment\n\n```yaml\n# Tailscale operator for Kubernetes\napiVersion: v1\nkind: Secret\nmetadata:\n  name: tailscale-auth\n  namespace: tailscale\ntype: Opaque\nstringData:\n  TS_AUTHKEY: \"tskey-auth-xxxxx\"\n---\napiVersion: apps\u002Fv1\nkind: DaemonSet\nmetadata:\n  name: tailscale\n  namespace: tailscale\nspec:\n  selector:\n    matchLabels:\n      app: tailscale\n  template:\n    metadata:\n      labels:\n        app: tailscale\n    spec:\n      containers:\n      - name: tailscale\n        image: tailscale\u002Ftailscale:latest\n        env:\n        - name: TS_AUTHKEY\n          valueFrom:\n            secretKeyRef:\n              name: tailscale-auth\n              key: TS_AUTHKEY\n        - name: TS_KUBE_SECRET\n          value: tailscale-state\n        - name: TS_USERSPACE\n          value: \"true\"\n        securityContext:\n          capabilities:\n            add: [\"NET_ADMIN\"]\n```\n\n## Access Control Lists (ACLs)\n\nTailscale ACLs define who can access what within your tailnet using a declarative JSON format. The default policy is deny-all, making it zero trust by design.\n\n```json\n{\n  \"acls\": [\n    \u002F\u002F Engineering team can access development servers\n    {\n      \"action\": \"accept\",\n      \"src\": [\"group:engineering\"],\n      \"dst\": [\"tag:dev-server:*\"]\n    },\n    \u002F\u002F SRE team can access production infrastructure\n    {\n      \"action\": \"accept\",\n      \"src\": [\"group:sre\"],\n      \"dst\": [\"tag:production:22,443,8080\"]\n    },\n    \u002F\u002F Database access restricted to backend services\n    {\n      \"action\": \"accept\",\n      \"src\": [\"tag:backend\"],\n      \"dst\": [\"tag:database:5432,3306,27017\"]\n    },\n    \u002F\u002F All employees can access internal tools\n    {\n      \"action\": \"accept\",\n      \"src\": [\"group:employees\"],\n      \"dst\": [\"tag:internal-tools:443\"]\n    }\n  ],\n\n  \"groups\": {\n    \"group:engineering\": [\"user@company.com\", \"dev@company.com\"],\n    \"group:sre\": [\"sre@company.com\", \"oncall@company.com\"],\n    \"group:employees\": [\"autogroup:members\"]\n  },\n\n  \"tagOwners\": {\n    \"tag:dev-server\": [\"group:engineering\"],\n    \"tag:production\": [\"group:sre\"],\n    \"tag:backend\": [\"group:sre\"],\n    \"tag:database\": [\"group:sre\"],\n    \"tag:internal-tools\": [\"group:sre\"],\n    \"tag:container\": [\"group:sre\"]\n  },\n\n  \"ssh\": [\n    {\n      \"action\": \"check\",\n      \"src\": [\"group:sre\"],\n      \"dst\": [\"tag:production\"],\n      \"users\": [\"root\", \"admin\"]\n    },\n    {\n      \"action\": \"accept\",\n      \"src\": [\"group:engineering\"],\n      \"dst\": [\"tag:dev-server\"],\n      \"users\": [\"autogroup:nonroot\"]\n    }\n  ],\n\n  \"nodeAttrs\": [\n    {\n      \"target\": [\"autogroup:members\"],\n      \"attr\": [\"funnel:deny\"]\n    }\n  ]\n}\n```\n\n## Exit Nodes and Subnet Routing\n\n### Configure Exit Node\n\n```bash\n# On the exit node machine\nsudo tailscale up --advertise-exit-node\n\n# On the client machine, use the exit node\nsudo tailscale up --exit-node=\u003Cexit-node-ip>\n\n# Verify exit node routing\ncurl ifconfig.me  # Should show exit node's public IP\n```\n\n### Subnet Router Configuration\n\n```bash\n# Advertise local subnets through Tailscale\nsudo tailscale up --advertise-routes=10.0.0.0\u002F24,192.168.1.0\u002F24\n\n# Enable IP forwarding on Linux\necho 'net.ipv4.ip_forward = 1' | sudo tee -a \u002Fetc\u002Fsysctl.conf\necho 'net.ipv6.conf.all.forwarding = 1' | sudo tee -a \u002Fetc\u002Fsysctl.conf\nsudo sysctl -p\n\n# Accept routes on client\nsudo tailscale up --accept-routes\n```\n\n## Tailscale SSH (Zero Trust SSH)\n\nTailscale SSH replaces traditional SSH key management with identity-based access.\n\n```bash\n# Enable Tailscale SSH on a server\nsudo tailscale up --ssh\n\n# Connect using Tailscale SSH (no SSH keys needed)\nssh user@hostname  # Authenticates via Tailscale identity\n\n# Session recording (audit logging)\n# Configure in ACL policy:\n# \"ssh\": [{\"action\": \"check\", \"src\": [...], \"dst\": [...], \"users\": [...]}]\n# \"check\" action requires re-authentication and records sessions\n```\n\n## MagicDNS Configuration\n\n```bash\n# MagicDNS is enabled by default in new tailnets\n# Access devices by hostname instead of IP\nping my-server  # Resolves via MagicDNS\n\n# Custom DNS configuration via admin console\n# Split DNS: route specific domains to internal DNS servers\n# Global nameservers: override default DNS resolution\n```\n\n## Self-Hosted with Headscale\n\n```bash\n# Install Headscale (open-source Tailscale control server)\nwget https:\u002F\u002Fgithub.com\u002Fjuanfont\u002Fheadscale\u002Freleases\u002Flatest\u002Fdownload\u002Fheadscale_linux_amd64\nchmod +x headscale_linux_amd64\nsudo mv headscale_linux_amd64 \u002Fusr\u002Flocal\u002Fbin\u002Fheadscale\n\n# Create configuration\nsudo mkdir -p \u002Fetc\u002Fheadscale\nsudo headscale generate config > \u002Fetc\u002Fheadscale\u002Fconfig.yaml\n\n# Edit config for your environment\n# Key settings:\n#   server_url: https:\u002F\u002Fheadscale.example.com\n#   listen_addr: 0.0.0.0:8080\n#   private_key_path: \u002Fetc\u002Fheadscale\u002Fprivate.key\n#   db_type: sqlite3\n#   db_path: \u002Fvar\u002Flib\u002Fheadscale\u002Fdb.sqlite\n\n# Start Headscale\nsudo headscale serve\n\n# Create user and pre-auth key\nheadscale users create myorg\nheadscale preauthkeys create --user myorg --reusable --expiration 24h\n\n# Connect Tailscale client to Headscale\ntailscale up --login-server https:\u002F\u002Fheadscale.example.com\n```\n\n## Security Hardening\n\n### Key Expiry and Rotation\n\n```bash\n# Set key expiry in admin console (default: 180 days)\n# Force re-authentication periodically\n\n# Disable key expiry for servers (use auth keys instead)\nsudo tailscale up --authkey=tskey-auth-xxxxx\n\n# Pre-auth keys for automated deployment\n# Create ephemeral, single-use keys for CI\u002FCD\n```\n\n### Device Authorization\n\n```json\n{\n  \"nodeAttrs\": [\n    {\n      \"target\": [\"autogroup:members\"],\n      \"attr\": [\n        \"mullvad:deny\",\n        \"funnel:deny\"\n      ]\n    }\n  ],\n  \"autoApprovers\": {\n    \"routes\": {\n      \"10.0.0.0\u002F24\": [\"group:sre\"],\n      \"192.168.0.0\u002F16\": [\"group:sre\"]\n    },\n    \"exitNode\": [\"group:sre\"]\n  }\n}\n```\n\n### Network Lock (Tailnet Lock)\n\n```bash\n# Initialize network lock with signing keys\ntailscale lock init\n\n# Add trusted signing keys\ntailscale lock add nodekey:xxxxx\n\n# All new nodes require signing before joining\n# Prevents unauthorized nodes from joining the tailnet\n```\n\n## Monitoring and Observability\n\n```bash\n# View network status\ntailscale status --json | jq '.Peer | to_entries[] | {name: .value.HostName, online: .value.Online, os: .value.OS}'\n\n# Check connection quality\ntailscale ping \u003Cpeer-ip>\n\n# View network map\ntailscale netcheck\n\n# Audit logs available in Tailscale admin console\n# Integration with SIEM via webhook or API\n```\n\n## Integration Patterns\n\n### Service Mesh Integration\n\n```bash\n# Tailscale as sidecar for service-to-service communication\n# Each service gets a Tailscale identity\n# ACLs enforce service-to-service access policies\n\n# Example: API service can only reach database service\n# ACL: tag:api -> tag:database:5432\n```\n\n### CI\u002FCD Pipeline Integration\n\n```bash\n# Use ephemeral auth keys in CI\u002FCD\nexport TS_AUTHKEY=tskey-auth-xxxxx-ephemeral\ntailscale up --authkey=$TS_AUTHKEY --hostname=ci-runner-$CI_JOB_ID\n\n# Access internal resources during build\u002Fdeploy\n# Node automatically removed when container stops\n```\n\n## References\n\n- [Tailscale Documentation](https:\u002F\u002Ftailscale.com\u002Fkb\u002F)\n- [How Tailscale Works](https:\u002F\u002Ftailscale.com\u002Fblog\u002Fhow-tailscale-works)\n- [Tailscale ACL Documentation](https:\u002F\u002Ftailscale.com\u002Fkb\u002F1018\u002Facls\u002F)\n- [Headscale - Open Source Control Server](https:\u002F\u002Fgithub.com\u002Fjuanfont\u002Fheadscale)\n- [WireGuard Protocol](https:\u002F\u002Fwww.wireguard.com\u002Fprotocol\u002F)\n- [Tailscale SSH](https:\u002F\u002Ftailscale.com\u002Fkb\u002F1193\u002Ftailscale-ssh\u002F)\n",{"name":5,"tags":49,"author":52,"domain":43,"license":15,"version":53,"subdomain":54,"description":7},[39,28,37,30,38,35,50,34,51],"acl","headscale","mahipal","1.0","zero-trust-architecture","main","4d2fb89cdfb75f3f6fd3c6c5ec9ad90ea129eb3c","ai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn",1,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai","https:\u002F\u002Fgithub.com\u002Fluokai0","a solo builder.","2026-05-06 04:29:04",{"source":8,"skillName":5,"commands":64,"prompt":74,"zipAvailable":75},[65,68,71],{"tool":66,"command":67},"npx","npx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill deploying-tailscale-for-zero-trust-vpn",{"tool":69,"command":70},"bunx","bunx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill deploying-tailscale-for-zero-trust-vpn",{"tool":72,"command":73},"pnpm","pnpm dlx skills add luokai0\u002Fai-agent-skills-by-luo-kai --skill deploying-tailscale-for-zero-trust-vpn","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn\u002FSKILL.md",true,[77,83,88,94,98,102,108],{"path":78,"resourceType":79,"resourceTypeDesc":80,"sizeBytes":81,"sourceHtmlUrl":82},"assets\u002Ftemplate.md","ASSET","资产文件",2377,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn\u002Fassets\u002Ftemplate.md",{"path":84,"resourceType":84,"resourceTypeDesc":85,"sizeBytes":86,"sourceHtmlUrl":87},"LICENSE","许可证",11255,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn\u002FLICENSE",{"path":89,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":92,"sourceHtmlUrl":93},"references\u002Fapi-reference.md","REFERENCE","参考文档",1815,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn\u002Freferences\u002Fapi-reference.md",{"path":95,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":96,"sourceHtmlUrl":97},"references\u002Fstandards.md",1986,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn\u002Freferences\u002Fstandards.md",{"path":99,"resourceType":90,"resourceTypeDesc":91,"sizeBytes":100,"sourceHtmlUrl":101},"references\u002Fworkflows.md",3334,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn\u002Freferences\u002Fworkflows.md",{"path":103,"resourceType":104,"resourceTypeDesc":105,"sizeBytes":106,"sourceHtmlUrl":107},"scripts\u002Fagent.py","SCRIPT","脚本",5131,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn\u002Fscripts\u002Fagent.py",{"path":109,"resourceType":104,"resourceTypeDesc":105,"sizeBytes":110,"sourceHtmlUrl":111},"scripts\u002Fprocess.py",11884,"https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F21-external-registries\u002F08-pinkpixel-collection\u002Fdeploying-tailscale-for-zero-trust-vpn\u002Fscripts\u002Fprocess.py",[113,140,157,185,218,255],{"skillNo":114,"name":115,"nameZh":6,"description":116,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":117,"licenseFileUrl":6,"sourceHtmlUrl":118,"categories":119,"keywords":120,"publishedAt":44},"01M6F2SKTE208174C7S7JJCZC7","write-contracts","Generates secure Aptos Move V2 smart contracts with Object model, Digital Asset integration, security patterns, and storage type guidance. Includes comprehensive storage decision framework for optimal data structure selection. Triggers on: 'write contract', 'create NFT collection', 'build marketplace', 'implement minting', 'generate Move module', 'create token contract', 'build DAO', 'implement staking'. Ask storage questions when: 'store', 'track', 'registry', 'mapping', 'list', 'collection'.","MIT","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fwrite-contracts\u002FSKILL.md",[],[121,122,123,124,40,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139],"write","contracts","write contracts","storage","create","generate","collection","model","decision","ask","smart-contracts","selection","objects","structure","nft","token","aptos","critical","move",{"skillNo":141,"name":142,"nameZh":6,"description":143,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":117,"licenseFileUrl":6,"sourceHtmlUrl":144,"categories":145,"keywords":146,"publishedAt":44},"01M6F2RFXJ6T9MKW0A7N7GM45B","web-search","通用网络搜索技能，支持多引擎搜索（百度、必应、DuckDuckGo），无需API密钥即可获取实时信息","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fweb-search-ex-skill\u002FSKILL.md",[],[147,148,149,150,151,152,153,154,155,156],"web","search","web search","搜索","baidu","bing","duckduckgo","百度","多引擎","internet",{"skillNo":158,"name":159,"nameZh":6,"description":160,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":117,"licenseFileUrl":6,"sourceHtmlUrl":161,"categories":162,"keywords":166,"publishedAt":44},"01M6F2K968G1FZEZFPW2E6B222","solo-build","Execute implementation plan tasks with TDD workflow, auto-commit, and phase gates. Use when user says \"build it\", \"start building\", \"execute plan\", \"implement tasks\", \"ship it\", or references a track ID. Do NOT use for planning (use \u002Fplan) or scaffolding (use \u002Fscaffold).","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fsolo-build\u002FSKILL.md",[163],{"categoryNo":164,"categoryName":165,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000023","Skill与智能体开发",[167,168,169,170,171,172,173,174,148,175,176,177,121,178,179,180,181,182,183,184],"build","solo","solo build","MCP","workflow","commit","tasks","code","Bash","plan","read","auto","references","context7","query","scaffolding","ship it","project",{"skillNo":186,"name":187,"nameZh":6,"description":188,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":117,"licenseFileUrl":6,"sourceHtmlUrl":189,"categories":190,"keywords":197,"publishedAt":44},"01M6F2GKN39SGHSPWYB3662YC8","react-email","Use when building HTML email templates with React components, adding a visual email editor to an application using the React Email visual editor, rendering emails to HTML, or sending emails with Resend. Covers welcome emails, password resets, notifications, order confirmations, newsletters, transactional emails, and the embeddable email editor component.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Freact-email-skills\u002FSKILL.md",[191,194],{"categoryNo":192,"categoryName":193,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000005","邮件与沟通",{"categoryNo":195,"categoryName":196,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000009","前端开发",[198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,216,217],"react","email","react email","github","editor","components","react components","component","welcome","https","notifications","password","node","use","html","resend","visual","emails","rendering","with",{"skillNo":219,"name":220,"nameZh":6,"description":221,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":117,"licenseFileUrl":6,"sourceHtmlUrl":222,"categories":223,"keywords":236,"publishedAt":44},"01M6F2FBVGVDFSG8SSFJGXA40C","APITester Agent-Driven API Testing","Test API endpoints and document responses. Define tests in plain English, run them, get formatted results. Agent-driven Postman alternative.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fopenclaw-api-tester\u002FSKILL.md",[224,227,230,231],{"categoryNo":225,"categoryName":226,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000008","测试与质量",{"categoryNo":228,"categoryName":229,"taxonomyType":21,"taxonomyTypeDesc":22},"01JBSEEDCAT000000000000010","后端与接口",{"categoryNo":164,"categoryName":165,"taxonomyType":21,"taxonomyTypeDesc":22},{"categoryNo":232,"categoryName":233,"taxonomyType":234,"taxonomyTypeDesc":235},"01JBSEEDCAT000000000000030","开发工程师","PROFESSION","适用职业",[237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254],"testing","api","api testing","driven","APITester Agent Driven API Testing","test","run","postman","results","plain english","tester","endpoints","document","get","define","tests","english","api-tester",{"skillNo":256,"name":257,"nameZh":6,"description":258,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":117,"licenseFileUrl":6,"sourceHtmlUrl":259,"categories":260,"keywords":261,"publishedAt":44},"01M6F273Y3NGAPVJZ608BC0G9G","hubspot-implementation-plan","Generate a phased implementation plan from a HubSpot audit report. Creates prioritized, sequenced cleanup processes with effort estimates, dependencies, and automation feasibility. Use after running \u002Fhubspot-audit.","https:\u002F\u002Fgithub.com\u002Fluokai0\u002Fai-agent-skills-by-luo-kai\u002Fblob\u002Fmain\u002Fai-agent-skills\u002F22-clawhub-skills\u002Fhubspot-implementation-plan\u002FSKILL.md",[],[176,262,263,264,265,266,267,126,268,269,270,271,272,211,273,274,217,275],"implementation","hubspot","hubspot implementation plan","automation","feasibility","cleanup","planning","report","audit","audit report","phased implementation","dependencies","processes","hubspot audit"]