Skip to main content

Rules Engine

What is the Rules Engine?

The ZeroTier Rules Engine is a distributed traffic control system that runs inside the ZeroTier agent on each device. It allows you to define network access policies through ZeroTier Central that are then enforced locally and bidirectionally on every node.

Why Does It Matter?

Traditional firewalls and endpoint security tools only see encrypted ZeroTier traffic - they can't inspect or control what happens inside your virtual network. The rules engine operates at the ZeroTier virtual network layer, giving you granular control over traffic between specific devices or groups.

The rules engine is distributed and cryptographically secured. Policies are configured centrally through ZeroTier Central, then signed and pushed to each node where they're enforced locally. To bypass these rules, an attacker would need to compromise both sides of a connection.

note

The rules engine works alongside traditional security tools like firewalls and endpoint protection. They can and should be used together for full control over your network environment.


Traffic on ZeroTier networks can be observed and controlled with a system of globally applied network rules. These are enforced in a distributed fashion by both the senders and the receivers of packets. To escape the rules engine, a malicious attacker would need to fully compromise both sides of any conversation.

Rules in New Central

Subscription Requirement

Flow Rules are available to Essential subscribers and higher. Learn more about plans.

New Central provides a unified interface for managing network flow rules. To configure rules for your network:

  1. Select a network from the Networks page
  2. Navigate to the Flow Rules tab

Flow Rules Overview

Default Configuration

By default, flow rules are disabled and all traffic is allowed across the network. The interface shows the default Layer 2 Protocol Filter which allows only IPv4, IPv6, and ARP traffic, blocking all other Ethernet frame types. This filter operates at the data link layer and provides basic protocol whitelisting for your network.

Blocking All Traffic

When flow rules are enabled with no traffic types selected, all traffic across the network will be blocked:

Flow Rules - Block All Traffic

This configuration blocks all communication between nodes on the network.

Allowing Specific Traffic

You can enable flow rules and select specific traffic types to allow. In this example, only Ping & Traceroute (ICMP/ICMPv6), HTTP, and HTTPS traffic is allowed:

Flow Rules - Allow Selected Traffic

With this configuration, all nodes across the network can only communicate using these protocols. All other traffic will be dropped.

Custom Ports and Protocols

You can define custom port/protocol combinations for specific use cases. In this example, both UDP/25565 and TCP/25565 are opened (commonly used for game servers):

Flow Rules - Custom Port

Excluded Devices

The Excluded Devices section allows you to exempt specific devices from flow rule restrictions. All traffic to and from excluded devices will be allowed, regardless of the rules configured above.

Flow Rules - Excluded Devices

Example Use Case: In the screenshot, flow rules restrict all network traffic to HTTP, HTTPS, and Ping & Traceroute. This means all nodes can share web traffic and diagnostics with each other. However, only the excluded administrator device can use SSH traffic, preventing other nodes from accessing each other via SSH while still allowing the administrator full access.

Resetting Rules

To reset all rules to their defaults (disabling all flow rules and returning to allow-all traffic):

  1. Navigate to your network's Flow Rules tab
  2. Click the Restore Defaults button
  3. Confirm the reset
info

Resetting rules returns the network to its default state where all traffic is allowed.