Skip to content

Configuring and testing DNS

The network resolvers send Internet names to public DNS operators. A single option selects them for the entire fleet : the HCS and gateways each derive their configuration from it.

ComponentUseForm
HCS unboundrelay for public namesDoT, verified by name
AdGuard Home (gateway)bootstrap of its upstreamsplain DNS
AdGuard Home (gateway)fallbackDoT by IP address
dnsmasq (gateway)fallback serversplain DNS

Outside this selection : AdGuard Home’s filtering upstream (AdGuard DNS, a filtering policy) and the Internet access ping probes.

NameOperatorNote
cloudflareCloudflare 🡕by default
adguardAdGuard DNS 🡕, unfilteredby default
quad9Quad9 🡕refuses France since 24/11/2026
  1. Declare the selection

    In a project module : any file in usr/modules/ applies to all hosts, so the HCS and gateways receive the same list.

    usr/modules/dns.nix
    {
    darkone.system.dns.publicResolvers = [
    "quad9"
    "cloudflare"
    ];
    }

    At least two distinct operators : if a single one refuses, all DNS goes down, so evaluation rejects it.

  2. Register the module

    git add usr/modules/dns.nix (the flake ignores untracked files), then just clean, which adds it to usr/modules/default.nix.

  3. Deploy the HCS then the gateways

    just apply <hôte> test on each, test, then just apply <hôte> switch. Other hosts are unchanged.

  1. The operator responds

    From the HCS and from a gateway (just enter <hôte>), over DoT with certificate verification :

    Fenêtre de terminal
    dig +tls +tls-ca +tls-hostname=dns.quad9.net @9.9.9.9 example.org

    status: NOERROR → usable. REFUSED → the operator refuses this country or this address.

  2. The HCS resolves

    Fenêtre de terminal
    dig @127.0.0.1 domain.tld # NOERROR
    dig @127.0.0.1 example.org # NOERROR
    dig @127.0.0.1 dnssec-failed.org # SERVFAIL : DNSSEC validé
  3. The zone resolves

    From a workstation in the zone :

    Fenêtre de terminal
    dig domain.tld
    dig example.org

    NOERROR, Query time under one second. The apex domain.tld, unknown to the local names, traverses the whole chain : gateway, then HCS, then operator.

  4. AdGuard Home without errors

    On the gateway, no lines expected :

    Fenêtre de terminal
    journalctl -u adguardhome --since -10min | grep '\[error\]'

LiveKit’s JWT service on the HCS no longer resolves domain.tld : journalctl -u lk-jwt-service shows dns error. Test the HCS (step 2).

AdGuard Home bootstrap unreachable : every uncached name waits for its timeout. The logs show exchanging with <ip>:53 … i/o timeout. Remove the faulty operator from the selection.

When step 1 returns NOERROR from the HCS and a gateway : add quad9 to the selection, then deploy.

In the framework : an entry in the publicResolvers catalogue (dnf/lib/dns.nix), with its IPv4 and IPv6 addresses and the name of its certificate. This certificate must cover its IP addresses, otherwise the DoT fallback by IP fails :

Fenêtre de terminal
openssl s_client -connect <ip>:853 </dev/null | openssl x509 -noout -ext subjectAltName