Skip to content

How Guard enforces grants

A grant says what a node may reach: another node, or a resource that a node serves. Every Guard node checks each packet that it receives against the grants of the node that sent it, and drops a packet that no grant covers. This page describes what a grant guarantees, how to see whether a node enforces grants, how to read what a node dropped, and the order to upgrade in.

Enforcement has no setting. It’s on for every network that a Guard control plane manages, and you can’t turn it off for a network or a node.

  • Guard client 0.26.0 or later on every node that serves a resource: a subnet router, both routers of a site-to-site connection, a node that serves an application, and a Kubernetes connector.
  • Guard control plane 0.36.0 or later. From that version, the control plane routes a resource only through nodes that enforce grants. See Upgrade in this order before you upgrade it.
  • A tenantAdmin or networkAdmin role on the Guard network.
You grant a nodeThe granted node reachesIt doesn’t reach
A resource of kind subnet or hostThe addresses of the resource, through a node that serves it.Any other address behind the serving node, and the serving node’s own mesh address.
A resource of kind applicationThe addresses that the application’s name resolves to, through a node that serves it.The same.
A nodeThat node’s own mesh address.Anything that the node serves.

A grant has a direction. The granted node can open connections. The other end can answer them, and can’t open connections of its own to the granted node. To let two nodes open connections to each other, grant each of them the other.

A grant names addresses, not ports. A granted node reaches every port and protocol of the addresses that it’s granted.

A node applies two checks to every packet that arrives from another node, after it decrypts the packet and before it delivers or forwards it:

  1. The source belongs to the sender. The packet’s source address must be one that the sending node holds: its own mesh address, or an address in a subnet or host that it serves. A node can’t send with another node’s address.
  2. The destination is granted to the sender. The packet must be bound for something that the sending node is granted on or through the receiving node: a resource that the receiving node serves, or the receiving node’s own mesh address when a grant names that node.

One kind of packet passes without a grant: a reply to a connection that the receiving node, or a machine that it forwards for, opened. An ICMP error about such a connection passes too.

A node remembers a connection for as long as it keeps sending on it. When the node has sent nothing on a connection for 2 hours for TCP, 3 minutes for UDP and other protocols, or 30 seconds for a ping, replies on it are dropped. A stream that only the far end sends on, such as one-way UDP, therefore needs a grant for the far end. A node remembers at most 65,536 connections at a time. While it holds that many, replies on a new connection are dropped.

The sender is the node whose tunnel the packet arrived on, never an address in the packet.

A packet from a host behind a router is accepted only when the most specific route that the receiving node has for the host’s address goes through that router, or through a standby router for the same resource. In Guard’s terms, the receiving node is granted a resource that covers the host’s address, and the router serves it.

When granted ranges nest, the smaller range decides. For example, one router serves 10.0.0.0/8, another serves 10.30.0.0/16, and a node is granted both. The node accepts a packet from 10.30.0.5 only through the second router.

A router that forwards for a range that it doesn’t serve as a resource has that traffic dropped at the node that receives it. Add the range as a resource that the router serves, and grant it.

A node that serves an application resource accepts the addresses that the name resolves to. When the name’s addresses change, the node keeps accepting each earlier address for at least 5 minutes and at most one hour, so that connections that a granted node opened with an earlier answer keep working.

A node that’s granted only a resource can’t reach the serving node’s own mesh address, on any port. To reach a router itself, for example over SSH, grant the node as well as the resource.

A node on a Guard client earlier than 0.26.0 doesn’t check what it receives:

  • A node that serves a resource stops serving. The control plane routes nothing through it, and the console shows it as Not serving, until you upgrade its client.
  • A node that serves nothing, such as a laptop, keeps working. Any node that it shares a grant with, in either direction, can open connections to it on every port. Upgrade its client to close that.

Client 0.26.0 is available for Linux and Windows. A Mac, iPhone, or iPad stays on its current client until a later release, and until then it doesn’t check what it receives.

Upgrade the nodes that serve resources before the control plane. A serving node that’s still on an earlier client when the control plane is upgraded stops serving, and its resources reach no one through it until its client is upgraded.

  1. Upgrade the Guard client to 0.26.0 or later on every node that serves a resource. No client updates itself:

    NodeHow it’s upgraded
    Linux, from the package repositoryThe host’s package manager.
    Linux, from a downloaded package or the static binaryInstall the new package or binary by hand, as in Add nodes.
    A Kubernetes connectorUpgrade the Guard operator to 0.3.3 or later, which runs client 0.26.0. See Connect a Kubernetes cluster.
  2. Upgrade the Guard control plane to 0.36.0 or later. If Authwise hosts your tenant, Authwise upgrades the control plane.

  3. In the console, open the network and select Nodes. Check that every node that serves a resource shows Enforcing grants.

  4. Upgrade the client on the other nodes, on the platforms that have client 0.26.0. Until a node is upgraded, it doesn’t check what it receives.

A serving node that was left behind starts serving again within about a minute of its client’s upgrade, at its next configuration poll.

In the console, open the network and select Nodes. A node that serves a resource shows one of three states:

StateWhat it means
Enforcing grantsThe node’s client checks each peer’s traffic against what that peer is granted.
Starting to enforceThe client can enforce grants and receives them at its next configuration poll, within about a minute. If the state lasts longer than a few minutes, the client isn’t receiving its configuration. Check its log.
Not servingThe client is too old to enforce grants. The node serves no resource until its client is upgraded.

A node that serves nothing shows no state.

The console repeats the Not serving state where it matters:

  • The network’s Overview lists the connectors that aren’t serving.
  • A resource’s page says which nodes serve it now, and which don’t until their client is upgraded.
  • On a node’s page, each resource under Serves is marked as not served.

On the node itself, the client’s log says which checks are on, and lists the drops:

Terminal window
sudo journalctl -u awguard-peer | grep -E "grant enforcement|dropped a packet"
Log lineWhat it means
grant enforcement: permit check onWritten when the client starts. Both checks are on.
grant enforcement: no permit list in the config; permit check off, source check onWritten when the client starts. The control plane is earlier than 0.36.0. The node checks the source of each packet and not its destination.
grant enforcement: permits changed permits=12A change to a grant or a resource reached the node. Both checks are on, here with 12 entries.
grant enforcement: permits changed, with no permits valueThe control plane stopped sending grants, for example after a rollback to a version earlier than 0.36.0. The node checks the source of each packet and not its destination.

The last of these lines says what the node does now. An earlier line can be out of date.

The awguard status command doesn’t show enforcement.

A node counts every packet that it drops, by the node that sent it and by the reason. The console shows the counts in three places:

  • The network’s Overview has one line for the last day, such as “Refused in the last day: 1,204 packets on 2 connectors”, with the connectors’ names and the counts by reason.
  • A node’s page, under Traffic, has a line with the node’s total for the window, and a Dropped column with the count for each peer. Each count in the column is a total over the window shown, not the last report. Hold the pointer over a count to see its reasons.
  • Events has a guard.packets_dropped event. To open the events for the network, click See the refusals in events on the Overview. The event’s target is the node whose packets were dropped, and the node that dropped them is an attribute.

A drop has one of two reasons:

In the consoleIn an eventIn the client’s logWhat happened
from an address the peer does not holdsource_not_heldreason="source"The packet’s source wasn’t an address of the node that sent it.
to a destination the peer is not grantednot_permittedreason="permit"The sending node isn’t granted the packet’s destination on or through this node.

Guard writes at most one event for each node, sending node, and reason in a clock hour, so a port scan doesn’t flood the events. A node sends its counts with each configuration poll, and the counts are exact up to the node’s last poll. Drops after that poll are lost if the node stops before the next one. Guard keeps the counts by the hour for 90 days.

On the node, the client logs a drop as a warning with the sending node, the packet’s source and destination, and the reason. It logs at most one line a minute for each sending node. For about a minute after the client starts or its grants change, it logs up to one line a second. It counts every drop, logged or not.

2026-11-26T18:39:26.657793Z WARN guard_agent::peer: dropped a packet from a peer (logged at most once a minute per peer; once a second just after the permits change) from=d4b77b13 src=Some(100.64.0.12) dst=Some(100.64.0.7) reason="permit"

In this line, a node at 100.64.0.12 tried to reach the mesh address 100.64.0.7 of a node that it isn’t granted.

The from value is a short fingerprint of the sending node’s key. To find the node’s name, run awguard status --json on the node that wrote the line, and look for the peer with that fingerprint.

What you seeLikely cause
A steady count “to a destination the peer is not granted” from one nodeAn application on that node still tries an address that the node was never granted, or was granted before a grant was removed. Add the grant if the access is intended.
The same, to a router’s own mesh addressA node that’s granted only a resource is trying to reach the router itself. Grant the node as well.
The same, on a laptop or another node that serves nothing, from a routerA machine behind the router is trying to open a connection to the node. A resource grant lets the node reach the machine and not the reverse.
A count “from an address the peer does not hold” from a routerThe router forwards for a range that it doesn’t serve as a resource, or that this node isn’t granted. See Traffic that a router forwards.
A burst to many addresses or ports from one nodeA scan from that node. Find out what ran it.
  • It doesn’t filter ports. A grant covers every port of the addresses that it names. To limit ports, use the firewall or security group that protects the machines.
  • It doesn’t filter inside a granted range. To grant less, serve less: a smaller subnet, or a single machine with kind host.
  • It doesn’t tell the machines on a subnet which node connected. A subnet router rewrites the source of what it forwards, as in Route a subnet through a Linux node.

From control plane 0.36.1, a control plane in remote mode needs the estate’s administration audience, and doesn’t start without it. Set it before you upgrade:

  • With the operator, set spec.auth.audience on the AuthwiseGuardServer.
  • Without the operator, set auth.audience in the control plane’s configuration.

Use the identifier URI that your administrators’ tokens carry in aud, such as https://api.example.com, not the audience’s a-… ID. Upgrade the operator to 0.60.1 or later first. It refuses a remote AuthwiseGuardServer with no audience before any pod changes. A control plane in local mode is unaffected.

To check, list each Guard server’s mode and audience:

Terminal window
kubectl get authwiseguardservers -A -o jsonpath='{range .items[*]}{.metadata.namespace}/{.metadata.name} {.spec.access.mode} {.spec.auth.audience}{"\n"}{end}'

A line that shows remote with nothing after it needs an audience before you upgrade.

When you roll the control plane back to a version earlier than 0.36.0, each node keeps the source check and stops checking destinations at its next configuration poll. Nodes on an earlier client serve again. The console shows no enforcement state until the control plane is upgraded again.

SymptomCause and fix
After the upgrade, a node can’t reach a router’s own mesh address, for example with ssh or ping, and still reaches the subnetThe node is granted the resource and not the router. Open the node, and under Can reach select the router.
A resource reaches no one, and its serving node shows Not servingThe node’s client is earlier than 0.26.0. Upgrade it.
A node shows Starting to enforce for more than a few minutesThe client isn’t receiving its configuration. Check that the service is running and read its log.
A machine behind a router could open connections to a Guard node before the upgrade, and can’t nowA resource grant has one direction. To allow the reverse, open the router, and under Can reach select the node.
A router’s traffic is dropped “from an address the peer does not hold”The router forwards for addresses outside the resources that it serves, or the receiving node isn’t granted the resource. Serve the range as a resource and grant it.
The client’s log has permit entry ignoredThe control plane sent a grant in a form that this client doesn’t understand. Upgrade the client.
Every node on a network disconnects for a few seconds at onceA change to the network’s relay pool restarts the Guard client on every node of the network. Packaged installs, the Windows service, the Apple apps, and the Kubernetes sidecar start again on their own. A client that runs in a container outside Kubernetes needs a restart policy, such as docker run --restart unless-stopped.