A DNS query in brief

When you visit a domain, your device usually needs to look up its address first. A DNS server may answer from local data or cache, or ask an upstream DNS server.

An upstream is like a guide: different guides may offer different answers or suit different networks. DNS routing chooses a handling path for the question instead of using one upstream for everything.

How rules decide

In updns, domain lists define what to match and rules define what to do, such as selecting upstreams or blocking. Rules are evaluated in configuration order; a fallback can handle queries that match no ordinary rule.

Without a matching or fallback rule, updns uses the full upstream list. The chosen query strategy still determines how those upstreams are queried.

Start small

Configure an upstream and domain list in LuCI, then create a rule referencing them. Save and apply the configuration; audit a domain in the list and compare it with one outside the list.

DNS routing controls resolution; it does not automatically configure traffic forwarding. Routing or filtering based on results also requires correctly configured nftables sets and network rules.

Command

updns google.com

Example output

From the project guide; actual output depends on configuration, cache, and network conditions.

Domain       : google.com.
Query Type   : A / AAAA
Query Path   : Cache Hit
Matched Rule : US Access
Upstream     : A=Google-DoH / AAAA=Google-DoH
Action       : IPv4 + IPv6
Response     : NOERROR

How to read it

This example matches US Access and shows Google-DoH as the cached source for both A and AAAA. Cache Hit means this query used cache, not that it contacted Google-DoH again. Your rules and upstreams will differ.

Not seeing the expected path?

Check that the domain is in the list and that an earlier rule did not match first. Once a rule matches, only its referenced upstreams are used; an empty or failing group does not fall back to the full upstream list.

Then check the upstream protocol and connectivity in LuCI. Applying configuration can restart the service and clear its in-memory cache, so the next query may take a different path.

Continue to the complete guide