📖 L2 of 8 · M4⏱ 8 min

ACLs

The rules that decide who can reach what. Default is "everyone reaches everything." Here's how to tighten that — with a live sandbox to test against.

1Where ACLs live

One file per tailnet, in HuJSON (JSON with comments and trailing commas). Edit it in the admin console at Access controls.

Default policy for new tailnets:

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

Wide open: anyone in the tailnet can reach any device on any port. Fine for a tailnet of 2 personal laptops; risky for IoT devices and shared servers.

2Building blocks

  • groups: name a list of users. "group:family": ["alice@home", "bob@home"]
  • tagOwners: declare tags (covered in L1)
  • acls: the rules themselves, each an {action, src, dst} triple
  • ssh: rules specifically for Tailscale SSH (covered in L7-ish areas)

3The shape of a rule

{
  "action": "accept",
  "src": ["group:family"],
  "dst": ["tag:server:*", "tag:media:*"]
}

"Members of group:family can reach any port on tag:server or tag:media devices."

Tokens you'll use:

  • src: *, "user@email", "group:name", "tag:name"
  • dst: same tokens, but with a port suffix — "tag:server:*" for any port, "tag:server:22" for SSH only

4How matching works

Rules are evaluated top to bottom. The first matching rule wins. If no rule matches, the connection is dropped.

Default-deny is automatic. Unlike some firewall systems, you don't write a "deny all" rule at the bottom — the absence of a matching accept is itself a deny.

5A complete production-style example

{
  "groups": {
    "group:adults": ["alice@home", "bob@home"],
    "group:kid":    ["kid@home"],
    "group:guests": ["guest@friends"]
  },
  "tagOwners": {
    "tag:server": ["group:adults"],
    "tag:media":  ["group:adults"],
    "tag:ai":     ["group:adults"],
    "tag:iot":    ["group:adults"]
  },
  "acls": [
    { "action": "accept", "src": ["group:adults"], "dst": ["*:*"] },
    { "action": "accept", "src": ["group:kid"],    "dst": ["tag:media:*", "tag:iot:*"] },
    { "action": "accept", "src": ["group:guests"], "dst": ["tag:media:*"] },
    { "action": "accept", "src": ["tag:server"],   "dst": ["tag:server:*", "tag:ai:*"] }
  ]
}

Adults: full access. Kid: media + IoT only. Guests: media only. Servers can talk to AI rig (e.g. for inference) but not vice versa. IoT devices can't reach anything (no rule grants them src access).

6Open the sandbox

Reading ACL rules and predicting their effect is hard. We built a live sandbox that loads a simulated tailnet and shows you the resulting "who can reach whom" matrix as you type.

→ Open the ACL sandbox. Try the "Production-style" preset, then change kid@home to group:adults. Watch their access matrix change.

7Saving safely

The admin console has a "Test" button. Always click that before saving — it'll show whether your edits would currently lock anyone out (e.g. "the rule change would deny you@example.com from reaching any device"). If it warns you, fix the policy before saving.

Worst-case ACL mistake: you lock yourself out of your own admin console session. Recovery: log in via the device console at the OS level (since OS access doesn't go through ACLs), or roll back the policy from the admin web. Don't panic — your tailnet doesn't break, just access to it.

🧠Knowledge check

Three quick questions

Q1.You add a new rule with "src": ["tag:iot"], "dst": ["tag:server:*"]. What does it do?
Q2.What's the effect of having no rules in acls?
Q3.You want to test an ACL change before going live. What's the right approach?
3 / 3
Onward to Serve.