TailscaleGuide
Isometric white padlock above a dark grid of glowing pink network nodes linked by arrows, depicting access control rules between devices on a private network.
Networking

Tailscale ACL Examples Explained: 8 Policy Patterns

See eight Tailscale ACL examples for devices, groups, subnets, exit nodes, and SSH. Learn when to use grants and how to test access before saving.

By TailscaleGuide Editorial · ·Updated · 9 min read

Tailscale access rules deny connections by default. With a custom policy, a connection needs a matching ACL or grant. New tailnets start with an allow-all policy. Tailscale recommends grants for new rules, and existing ACLs still work. ACL documentation · migration guide

How does a Tailscale ACL rule work?

An ACL is a one-way permit. The source (src) can start a connection to the destination and port (dst), optionally limited by protocol (proto). Each destination enforces incoming rules. An ACL for a laptop to reach a NAS leaves NAS-initiated connections blocked unless another rule allows them. Local LAN traffic stays outside the Tailscale policy. ACL documentation

{
  "action": "accept",
  "src": ["group:admins"],
  "proto": "tcp",
  "dst": ["tag:server:22,443"]
}

The rule permits the admin group to connect to tagged servers over TCP on ports 22 and 443. accept is the only ACL action, so matching permissions add up regardless of rule order. To revoke access, remove or narrow every matching rule. policy file syntax reference · Grants explained

The policy file uses HuJSON, which supports comments and trailing commas. Selectors include users, groups, tags, autogroups, IPs, CIDRs, and hosts aliases. The * selector in a source or destination includes IPs from approved subnet routes. targets and selectors reference · How a Tailscale mesh VPN works

Open Access controls in the admin console to edit the tailnet policy. Replace sample identities and addresses with yours, and merge the examples you need into the existing top-level sections. Edit access control policies

The default allow-all policy

This is the legacy form of the starter policy. The wildcard lets tailnet devices reach all ports on other tailnet devices and covers approved subnet routes. The SSH rule lets members use Tailscale SSH on their own devices as root or non-root, with reauthentication. ACL policy examples

{
  "acls": [
    { "action": "accept", "src": ["*"], "dst": ["*:*"] }
  ],
  "ssh": [
    {
      "action": "check",
      "src": ["autogroup:member"],
      "dst": ["autogroup:self"],
      "users": ["autogroup:nonroot", "root"]
    }
  ]
}

Replace the wildcard permit with narrower rules when setting up your first tailnet. Leaving it in place preserves broad access, including to a management subnet once its route is approved. ACL policy examples

Deny all

An explicit empty acls array with no grants permits no tailnet connections. An empty policy file ({}) restores the allow-all access default. If you are editing a mixed policy, remove any grants that would still permit traffic. ACL policy examples · Grants explained

{ "acls": [] }

Keep a separate way to manage devices before applying a policy that cuts off all tailnet access.

Users reach their own devices

Each direct member can reach their own user-owned devices. Use autogroup:self as the destination with a user, group, or role-based autogroup as the source. A tagged NAS needs its own rule. ACL policy examples · targets and selectors reference

{
  "acls": [
    { "action": "accept", "src": ["autogroup:member"], "dst": ["autogroup:self:*"] }
  ]
}

Tags for servers

Tags give infrastructure its own identity. The tagOwners entries below let tailnet admins assign the tags. The ACL permits traffic from the media server to the NAS on two example service ports. tags documentation

{
  "tagOwners": {
    "tag:server": ["autogroup:admin"],
    "tag:nas": ["autogroup:admin"],
    "tag:media": ["autogroup:admin"],
    "tag:dns": ["autogroup:admin"]
  },
  "acls": [
    { "action": "accept", "src": ["tag:media"], "dst": ["tag:nas:445,2049"] }
  ]
}

This accommodates direct-hosted SMB on TCP 445 and NFSv4.1 on TCP 2049. An SSH connection from that media server to the NAS would require another rule. Microsoft SMB documentation · RFC 8881

On the NAS, apply the defined tag using the login command. Tagging replaces the user identity, and key expiry is disabled by default when a newly tagged device authenticates. tags documentation

sudo tailscale login --advertise-tags=tag:nas

Groups and specific ports

Replace the sample logins with the ones shown in the admin console. Apply the tags defined above to the target devices. The admins can reach the server on ports 22 and 443, and the family can reach the media server on 443. policy file syntax reference

{
  "groups": {
    "group:admins": ["admin@example.com"],
    "group:family": ["family@example.com"]
  },
  "acls": [
    { "action": "accept", "src": ["group:admins"], "dst": ["tag:server:22,443"] },
    { "action": "accept", "src": ["group:family"], "dst": ["tag:media:443"] },
    { "action": "accept", "src": ["autogroup:member"], "dst": ["tag:dns:53"] }
  ]
}

The last rule permits members to reach DNS over both TCP and UDP on port 53. A resolver may retry over TCP after a truncated UDP reply. To use proto in an ACL, clients need Tailscale v1.18.2 or later. Tailscale DNS port guidance · RFC 7766, DNS Transport over TCP - Implementation Requirements · policy file syntax reference

Subnet routes and host aliases

The hosts section gives readable names to a management subnet and a NAS IP. Using the groups above, give admins two management ports across the subnet and give family members one port on the NAS. ACL policy examples

{
  "hosts": {
    "mgmt-vlan": "192.168.10.0/24",
    "nas-lan": "192.168.40.10"
  },
  "acls": [
    { "action": "accept", "src": ["group:admins"], "dst": ["mgmt-vlan:22,443"] },
    { "action": "accept", "src": ["group:family"], "dst": ["nas-lan:445"] }
  ]
}

Advertise and approve the actual subnet routes for both destinations. Route approval makes the routes available to clients. The access policy controls which traffic can use them. Tailscale subnet router documentation · Tailscale subnet router configuration

Exit node access

The default policy permits any user to use an approved exit node. With a custom policy, allow autogroup:internet for the users who should route public internet traffic through an exit node. A rule targeting the exit node itself only covers connections to that device. exit node documentation · targets and selectors reference

{
  "acls": [
    { "action": "accept", "src": ["group:family"], "dst": ["autogroup:internet:*"] }
  ]
}

Limit a group to a tagged exit node with via

To offer the family only a particular exit node, replace that ACL with this grant. Merge the tag definition into tagOwners, apply it to the approved exit node, and select the exit node in the client. via accepts tags. A second matching internet permit without via can make other exit nodes available again. Grant examples · Grants explained · Tailscale exit node setup

{
  "tagOwners": {
    "tag:home-exit": ["autogroup:admin"]
  },
  "grants": [
    {
      "src": ["group:family"],
      "dst": ["autogroup:internet"],
      "via": ["tag:home-exit"],
      "ip": ["*"]
    }
  ]
}

Tailscale SSH rules

Tailscale SSH requires network access to the server on port 22 and an ssh rule authorizing the local login account. Use the admin group and server tag defined earlier. Here, check requires reauthentication, with a default check period of 12 hours. accept allows the login without that extra check. This example permits root and any non-root account on the server. To limit logins to specific local accounts, name those accounts in users. Tailscale SSH documentation

{
  "acls": [
    { "action": "accept", "src": ["group:admins"], "dst": ["tag:server:22"] }
  ],
  "ssh": [
    {
      "action": "check",
      "src": ["group:admins"],
      "dst": ["tag:server"],
      "users": ["autogroup:nonroot", "root"]
    }
  ]
}

Enable it on the destination host. Keep another way to connect, since enabling Tailscale SSH can hang an existing SSH session to the Tailscale IP. An SSH rule for a tagged source needs a tagged destination and the accept action. Tailscale SSH documentation

tailscale set --ssh

How do Tailscale ACL tests work?

Add tests to assert which connections must be allowed or blocked. Tailscale runs tests for network ACLs and grants whenever the policy changes. It rejects the save if an assertion fails. Use sshTests for Tailscale SSH login permissions. policy file syntax reference

The tests below use the rules from Tags for servers, Groups and specific ports, and Subnet routes and host aliases, with the starter wildcard removed.

{
  "tests": [
    {
      "src": "tag:media",
      "proto": "tcp",
      "accept": ["tag:nas:445"],
      "deny": ["tag:nas:22", "tag:server:443"]
    },
    {
      "src": "group:family",
      "proto": "tcp",
      "accept": ["tag:media:443", "192.168.40.10:445"],
      "deny": ["tag:server:22", "192.168.10.1:443"]
    }
  ]
}

Use specific targets in tests. Use an individual IP or hostname to test access to a subnet, and reserve wildcards and CIDRs for rules. If a rule checks device posture, supply the attributes with srcPostureAttrs. Policy tests evaluate permission, so verify route selection separately when using via. policy file syntax reference · Grants explained

Preview and debug access

  1. Open Access controls → Preview rules in the admin console. Select a user, such as a member of group:family, and review the allowed destinations and the policy line behind each one. For unexpected access, look for overlapping wildcards or grants. Edit access control policies · Grants explained
  2. If an expected rule is missing, check the user’s group membership and confirm the destination has the intended tag. Keep the group: and tag: prefixes. For via, run tailscale status to see whether the tagged router is online, then confirm the route or exit node is approved. Troubleshooting grants
  3. From the affected client, substitute the target’s Tailscale IP or machine name for device-name. Use the ping modes below to narrow down the problem, then check the actual service port. Tailscale CLI · Tailscale ping message types
CommandWhat it checks
tailscale ping device-nameDISCO discovers the peer path and reports a direct or relayed connection.
tailscale ping --tsmp device-nameTSMP checks the WireGuard tunnel before access policy enforcement and bypasses the OS IP stack.
tailscale ping --icmp device-nameICMP checks end-to-end IP access, including policy enforcement.
tailscale ping --peerapi device-namePeer API checks the peer’s HTTP API for features such as Taildrop.

If TSMP replies but ICMP fails, check the access policy and the destination’s firewall. A ping checks its own protocol. For a TCP service, use tailscale nc or the application itself. Debug access control policies · Tailscale CLI

tailscale nc device-name 443

For example, use the media server’s Tailscale address and a working HTTPS listener on that port. Try from a family device that should connect and from a device that should fail. For an exit node, select it in the client and verify the public IP matches the exit node’s public IP. exit node documentation

Should you write ACLs or grants?

Use grants for new rules. Tailscale made grants generally available on May 29, 2025, and both formats can coexist in one policy. Grants add route filtering through via and application capabilities through app. migration guide

To convert in the console, open Access controls → JSON editor, choose Convert to grants, review the converted rules, then select Save. To convert manually, move ports from dst to ip, prefix them with the protocol if specified, and drop the explicit action. migration guide

Here is the grant equivalent of the ACL from Tags for servers.

{
  "grants": [
    { "src": ["tag:media"], "dst": ["tag:nas"], "ip": ["445", "2049"] }
  ]
}

Keep different destination and port combinations in separate grants. Combining tag:web-server:80 and tag:dev-server:22 into one grant with both tags and both ports would open both ports on both targets. Preserve the separate ssh section. migration guide

Require device posture for a grant

This grant gives the admin group HTTPS access to tag:server from macOS devices. In Groups and specific ports, narrow the admin ACL destination to tag:server:22 before adding the grant. Check other matching rules too, since Tailscale evaluates posture on each rule independently. Postures in access rules · Grants explained

{
  "postures": {
    "posture:macos": {
      "assertions": ["node:os == 'macos'"]
    }
  },
  "grants": [
    {
      "src": ["group:admins"],
      "dst": ["tag:server"],
      "ip": ["tcp:443"],
      "srcPosture": ["posture:macos"]
    }
  ]
}

Add these entries to your tests array, using a real member of group:admins in place of the sample login. The first entry simulates macOS and expects access. The second simulates Windows and expects denial. policy file syntax reference

{
  "tests": [
    {
      "src": "admin@example.com",
      "srcPostureAttrs": { "node:os": "macos" },
      "proto": "tcp",
      "accept": ["tag:server:443"]
    },
    {
      "src": "admin@example.com",
      "srcPostureAttrs": { "node:os": "windows" },
      "proto": "tcp",
      "deny": ["tag:server:443"]
    }
  ]
}

If the Windows assertion fails, check for another grant or ACL that still allows the connection. A rule with its own srcPosture replaces any defaultSrcPosture for that rule. An empty srcPosture list removes that default. Grants explained

Which Tailscale plans support these policy features?

ACLs, grants, tags, policy tests, and built-in posture attributes such as the operating system are available on all plans. ACL documentation · Tailscale pricing · Device posture management

Policy featurePersonalStandardPremiumEnterprise
Listed ACL groups310300Custom
Third-party and geolocation posture attributesNoYesYesYes
Custom posture attributesNoNoYesYes
Tailscale SSH check modeDefault periodDefault periodCustom period availableCustom period available

Tailscale says ACL group caps are currently unenforced. Standard lists up to five Basic Tailscale SSH hosts. Plan allowances were checked on November 22, 2026. Tailscale pricing

Manage the policy with GitOps or Terraform

Use GitOps to review and automatically validate policy changes in version control. If you already manage Tailscale with Terraform, the official provider’s tailscale_acl resource manages the tailnet policy file. GitOps for Tailscale · Tailscale Terraform provider

FAQ

How do I block a device in a Tailscale ACL?

Remove or narrow every ACL and grant that permits its traffic. Check for implicit matches through wildcards, groups, and tags. For an immediate cut-off, remove the device from the admin console’s Machines page. Grants explained · Remove a device

Evidence and limits. The examples follow the Tailscale policy syntax and CLI documentation available on November 22, 2026. The examples and commands were not run on a tailnet.

Sources

  1. ACL policy examples
  2. Syntax reference for the tailnet policy file
  3. Manage permissions using ACLs
  4. Targets and selectors
  5. Group devices with tags
  6. Exit nodes (route all traffic)
  7. Tailscale SSH
  8. Migrate from ACLs to grants
  9. A new generation of Tailscale access controls
  10. RFC 7766: DNS Transport over TCP - Implementation Requirements
  11. Grant examples
  12. Grants explained
  13. Postures in access rules
  14. Subnet routers
  15. Edit access control policies in your tailnet policy file
  16. Tailscale CLI
  17. Tailscale ping message types
  18. Troubleshooting grants
  19. Tailscale pricing
  20. Device posture management
  21. GitOps for Tailscale
  22. Manage Tailscale resources using Terraform
  23. Remove a device
  24. Direct host SMB over TCP/IP
  25. RFC 8881: Network File System Version 4 Minor Version 1 Protocol
  26. Best practices for using app connectors

Related