Get started
Login
© 2024

Tailnet policy file

The tailnet policy file is a centralized human JSON (HuJSON) configuration file that stores parameters, policies, and settings for your Tailscale network (known as a tailnet). Owners, Admins, and Network admins can manage your tailnet policy file from the Tailscale admin console. You can also manage the tailnet policy file with GitOps using GitHub, GitLab, or Bitbucket.

The tailnet policy file is organized into multiple top-level sections, each offering different functionality. You can use the various sections of the tailnet policy file to:

  • Specify who can use which tags to authenticate devices.
  • Specify who can bypass the approval process to advertise subnet routers and exit nodes.
  • Apply additional attributes called node attributes to devices and users.
  • Write tests to make assertions about access policies (ACLs and Tailscale SSH) that should not change.
  • Define tailnet-wide policy options (such as disabling IPv4).

Using the different sections of the tailnet policy file in unison lets you manage your tailnet in a modular and fine-grained manner. For example, you can define a custom group of users, then create an access control policy to specify how the users in that group can traverse the resources in your tailnet.

Sections

The following table provides an overview of each top-level section of the tailnet policy file.

SectionNameWhat it’s forResources
aclsAccess control lists (ACLs)Create network-level access control policies.Syntax reference →
autoApproversAuto approversSpecify who can bypass the approval process to advertise subnet routers, and exit nodes, and app connectors.Syntax reference →
grantsGrantsDefine network-level and application-level access control policies.Syntax reference →
groupsGroupsDefine named groups of users, devices, and subnets to target in access control policies and other definitions.Syntax reference →
hostsHostsDefine named aliases for devices and subnets.Syntax reference →
ipsetsIP setsDefine named network segments to target in access control policies and other definitions.Syntax reference →
nodeAttrNode attributesApply additional attributes to devices and users.Syntax reference →
posturesDevice posture policiesDefine device posture rules to target in access control policies.Syntax reference →
sshTailscale SSHSpecify who can use Tailscale SSH.Syntax reference →
sshTestsTailscale SSH testsWrite tests to make assertions about Tailscale SSH that should not change.Syntax reference →
tagOwnersTag ownersDefine who can assign which tags to devices in your tailnet.Syntax reference →
testsAccess control testsWrite tests to make assertions about access policies (ACLs and network-level grants) that should not change.Syntax reference →

There's also additional sections for network policy options, such as disabling IPv4 and customizing the DERP map. In most cases, these settings are unnecessary.

SectionWhat it’s forResources
derpMapCustomize the DERP servers that a tailnet uses.Syntax reference →
disableIPv4Disable using IPv4 in a tailnet.Syntax reference →
OneCGNATRouteModify the routes the Tailscale clients generate.Syntax reference →
randomizeClientPortControl whether devices prefer a random port number or the default 41641 for WireGuard traffic.Syntax reference →

Last updated Nov 28, 2024