Overlapping policies are where most configurations go wrong. For instance, if one policy sends an entire IoT network out WAN2 and a second sends a single camera on that network through a WireGuard tunnel, the gateway has to resolve which rule that camera's traffic follows.
Policy routes are evaluated before the main routing table, which means a policy match overrides a static route or the default route for the same destination. Among policies themselves, recent Network releases present routing policies as an ordered list, and where your release exposes that ordering, it is what breaks ties when two policies match the same traffic.
Rather than relying on precedence you have not verified, keep overlapping rules to a minimum. Here's how to structure them so the outcome stays predictable:
- Narrow before broad. Place device-scoped or domain-scoped policies above network-wide or all-traffic policies, so the specific case is evaluated first.
- One intent per policy. A policy that mixes ten unrelated domains is hard to debug, while separate policies per service make the list self-documenting.
- Name policies by outcome. A label such as Living Room TV via WG-Amsterdam tells the next administrator what the rule does without opening it.
- Recheck after upgrades. Network application updates have migrated and renamed routing features before, so confirm the list after every major release.
Domain-based destinations deserve particular attention, because the gateway cannot read a domain name inside an encrypted connection. Instead, it watches DNS responses passing through it, records the IP addresses each listed domain resolves to, and routes traffic headed to those addresses.
This is why domain policies depend on clients using the gateway, or a resolver that forwards through it, for DNS. Devices that hardcode a public resolver, browsers with DNS over HTTPS enabled, and apps that resolve over their own encrypted channels all bypass that lookup, so the gateway never learns the addresses and the traffic falls through to the default route — the same bypass problem that affects DNS filtering on UniFi.
Be aware of two further side effects. First, services behind a shared CDN may resolve to the same addresses as unrelated sites, so those sites follow the policy too; second, a client that cached a domain's address before the policy existed will connect without a fresh lookup, so flush the client's DNS cache or wait out the record's TTL before testing.
Similarly, connections that were already open when you saved a policy generally keep their original path until they close, so restart the app or device under test rather than judging the policy by a session that predates it.