Skip to main content

Access rules

Access rules define which team devices can connect to each other and on which ports. You configure them in Team → Access rules; the section is available to team admins and owners.

Default behavior​

Without custom rules, the system rules apply:

  1. devices of the same user see each other;
  2. everything else is denied.

So by default, devices of different members don't see each other. To open access, add an allow rule. Custom rules are available on the Legend plan, up to 100 of them. On other plans, the section shows only the system rules.

The Mesh VPN access rules section: system security rules and five custom rules with priorities

How a rule works​

FieldValues
Sourceall devices, a user's devices, a specific device, an IP address or subnet
Destinationthe same as for the source
Protocolany, TCP, UDP, ICMP, and other IP protocols
Portany, a single port 22, a range 1000-2000, or a list 80,443. Only for TCP, UDP, SCTP, and the "any" protocol
Actionallow or deny

Rules are checked in priority order, and the first matching rule wins. To change the order, drag the rules; system rules always come after yours. You can temporarily turn a rule off with the Enabled switch without deleting it.

Rules work at the level of IP addresses and ports; they don't distinguish HTTP requests or TLS.

Examples​

Give an admin access to all devices:

SourceDestinationProtocolPortAction
User anna@acme.devAllanyanyAllow

Let everyone reach SSH on the office gateway, but close the database:

SourceDestinationProtocolPortAction
Alloffice-gwTCP22Allow
Allprod-db-1anyanyDeny

Open the web interfaces in the office subnet shared by the gateway to everyone:

SourceDestinationProtocolPortAction
All10.20.0.0/16TCP443Allow

Check access​

On the Check access tab, you can find out whether the rules allow a connection without sending any traffic. Select the source and destination, the protocol and port, and click Check access. The result shows whether access is allowed and which rule matched.

The Check access tab: a connection from dev-laptop-boris to office-gw over TCP 22 is allowed by the rule with priority 1

The same from the command line, from the current device:

tuna mesh debug trace self office-gw --proto=tcp --dport=22

Changing the plan​

If the team moves from Legend to another plan, custom rules aren't deleted but stop working: only the system rules remain. After you return to Legend, the rules work again.