Upstreams and strategy
dnz fwd is a short alias for dnz forwarding.
Upstreams can be plain DNS (1.1.1.1, 9.9.9.9:53), DNS over TLS (tls://dns.quad9.net), DNS over
HTTPS (https://dns.google/dns-query), DNS over QUIC (quic://dns.adguard-dns.com) or DoH over
HTTP/3 (h3://cloudflare-dns.com/dns-query). See Forwarding for the full address
format.
The strategies are
failover, wrr, p2c, hrw and least_time. Changing it takes effect without a
restart.
Recursive resolution
Instead of forwarding, DNZ can resolve names itself from the root servers, like Unbound. See Recursive resolution.dnz forwarding show says when the mode is recursive; the upstream list is kept for switching back.
trace works whatever the mode. A rule resolves recursively with recursive as its upstreams:
DNSSEC validation
See DNSSEC validation.Conditional forwarding rules
Rules send a domain and its subdomains, or every name some clients ask for, to other resolvers.Rules for client networks
* as the domain needs --network.
Rule options
How rules are matched
- Rules are found by id, label or domain.
- They are checked in order (the
#column ofdnz forwarding rule list) and the first match wins. - A new rule goes above the first less specific rule (a shorter domain, or a wider network), unless
you pass
--position. - A rule that an earlier rule always catches first is marked never matches in the list.
Diagnosing an upstream
dnz forwarding diagnose <address> (alias diag) checks any upstream, configured or not, step by step
from the server. It prints each step as it finishes:
- name lookup (DoT and DoH)
- local route
- ping
- the TCP port
- the TLS handshake
- a DNS query over the upstream’s protocol (and over TCP for plain DNS)
- a check for port 53 interception
- a traceroute
--name and --type choose the query (default example.com A). The dashboard has the same check
behind the Diagnose button on every upstream and rule.
Serve-stale, prefetch and client subnet
--windowtakes90s,30m,12h,1dand so on, up to7d.--min-hitsis how often a name must be asked since it was cached to be refreshed in the last tenth of its TTL.dnz forwarding showlists these options under the rules.