Skip to content

Bare metal without the cloud: run your own validating DNS resolvers

Quad9 withdrew its service from France on 24 Nov 2026. How a mid-size firm can run its own DNSSEC-validating Unbound resolvers on its own hardware, with free software.

By Nishant Gauraw, NG-NeXTPublished Updated 8 min read

On 24 November 2026 at 09:00 Paris time, Quad9 began refusing DNS queries from users it identifies as being in France. Its same-day post said that any query reaching a Quad9 service address would be refused, and that no DNS resolution would be successful. Quad9's status page lists the change as "Quad9 No Longer Serving French Users as of November 24, 2026." TorrentFreak reported confirming the refusals with probes in France shortly after 09:00, and that Quad9 said the replies carry Extended DNS Error code 18 ("Prohibited"). Quad9 says it chose to withdraw rather than comply with French court-backed blocking demands from a sports rightsholder, and that its geoIP method of deciding who is "in France" is inexact, so some users outside France may be refused too and some inside may still get answers.

This post is not about who is right in that case. It is about what it shows. If your offices, servers or laptops point at a public resolver, then whether your names resolve depends on that resolver's legal position in your country, its routing, and its business decisions. None of those are under your control. Quad9 itself makes the point in the same post: "anyone can set up their own resolver in just a few seconds (though without the privacy and malicious content protection that Quad9 offers)." The second half of that sentence matters, and this post comes back to it.

This post is a chapter in the open series on running distributed bare metal with zero cloud dependence on mostly free software. An earlier guide, Proxmox VE, OpenNebula or Rancher?, covered which platform to run. This chapter covers a service almost everything on those platforms leans on: recursive DNS. The audience here is a mid-size firm spending somewhere between $100k and $1M+ a year on cloud and thinking about running more of it on its own hardware.

Recursive resolver vs authoritative DNS#

Two different jobs share the name "DNS":

  • An authoritative server answers for zones you own (for example example.com). That is where your public records live.
  • A recursive resolver answers your own users and servers. It walks the DNS tree from the root down, caches what it learns, and, if it validates DNSSEC, rejects answers whose signatures do not check out.

Quad9, Cloudflare's 1.1.1.1 and Google's 8.8.8.8 are public recursive resolvers. This post replaces that dependency. Authoritative hosting off the cloud is a separate chapter.

Why Unbound?#

Unbound is a free, BSD-licensed validating, recursive, caching resolver from NLnet Labs. Its own configuration guide says "all of the defaults are sensible and secure," and the defaults back that up. Per the unbound.conf(5) manual:

  • qname-minimisation defaults to yes: Unbound sends upstream servers only the labels they need, where possible. The manual calls it best effort; in some error cases it falls back to sending the full name.
  • aggressive-nsec defaults to yes: Unbound uses signed NSEC records to answer non-existent names from cache.
  • harden-dnssec-stripped defaults to yes: if a trust-anchored zone arrives without its DNSSEC data, the answer is treated as bogus instead of quietly accepted.
  • access-control: if no netblock matches, the query is refused. Out of the box only localhost is served.

PowerDNS Recursor and Knot Resolver are good free alternatives. The design below applies to them too; the configuration syntax differs.

The design for a mid-size firm#

Two resolvers per site, on separate failure domains. Two small VMs on different physical hosts, or one VM and one small physical box. Do not put both on the same hypervisor, the same UPS or the same switch if you can avoid it. Clients get both addresses through DHCP or your config management.

Full recursion, not forwarding. If you configure Unbound to forward everything to 1.1.1.1 or 9.9.9.9, you still have the same dependency; Unbound can validate and cache what comes back, but if the upstream refuses you, cache misses cannot be resolved through that upstream. A resolver that starts from the root servers depends on the root and on the authoritative servers for each name, which is what DNS was designed for. Unbound has built-in root hints, so no forward-zone is needed for this.

DNSSEC validation on. That needs a root trust anchor file Unbound can keep up to date by itself (RFC 5011), via auto-trust-anchor-file. The unbound-anchor(8) tool creates or refreshes it. The manual notes that the user Unbound runs as must be able to write to that file and its directory. Many Linux distribution packages set this up for you; check where yours keeps the file before you copy a path from a blog.

Clients only, never the internet. An open recursive resolver gets abused for amplification attacks. Allow only your own networks in access-control, and do not expose UDP/TCP 53 on these hosts to the internet. Outbound, the resolvers need UDP and TCP 53 to anywhere, because authoritative servers live everywhere.

A correct clock. DNSSEC signatures carry inception and expiration times (RFC 4034, section 3.1.5). A resolver with a badly wrong clock will reject valid answers. Run NTP on the resolver hosts and monitor it.

A starting configuration#

This is a minimal example built from the options documented in the unbound.conf(5) manual. The 192.0.2.x and 198.51.100.x addresses are documentation ranges; replace them with yours and keep the loopback lines. The trust anchor path is one the Unbound docs use; your distribution may use a different one. Some packages (Debian and Ubuntu among them) already set auto-trust-anchor-file in a file under /etc/unbound/unbound.conf.d/; if yours does, do not set it a second time.

server:
    interface: 192.0.2.53
    interface: 127.0.0.1
    access-control: 127.0.0.0/8 allow
    access-control: 192.0.2.0/24 allow
    access-control: 198.51.100.0/24 allow

    auto-trust-anchor-file: "/var/lib/unbound/root.key"

    # privacy and hardening (several of these are already defaults)
    qname-minimisation: yes
    harden-dnssec-stripped: yes
    hide-identity: yes
    hide-version: yes

    # keep popular names warm, and survive a short upstream outage
    prefetch: yes
    serve-expired: yes
    serve-expired-ttl: 86400

    # tell clients why a query failed (RFC 8914 Extended DNS Errors)
    ede: yes
    val-log-level: 2

What the less obvious lines do, per the manual:

  • prefetch: yes refreshes cache entries in the last 10% of their TTL when they are asked for. The manual estimates about 10% more traffic and load in exchange for popular names not expiring from the cache.
  • serve-expired: yes lets Unbound answer from expired cache entries when a fresh lookup errors out or takes too long. That is the default behaviour since Unbound 1.23 (serve-expired-client-timeout defaults to 1800 ms). Older versions served stale answers immediately unless that timeout was set. serve-expired-ttl limits how long after expiry that is allowed; RFC 8767 suggests between one and three days, and 86400 seconds (one day) is the default.
  • ede: yes adds Extended DNS Error codes (RFC 8914) to responses. With val-log-level: 2, DNSSEC failures in those responses also carry a text reason, and the log records why validation failed.
  • hide-identity and hide-version refuse id.server/hostname.bind and version.server/version.bind queries.

If you have more than one CPU core to spare, num-threads (default 1) and the cache sizes are the next things to tune. Do that after you have query numbers, not before.

Internal names (*.corp.example, reverse zones for your RFC 1918 ranges) belong on your internal authoritative servers. Unbound can send those queries there with a stub-zone block, or serve a few static names with local-zone and local-data. For the private reverse zones, Unbound has built-in default local zones; the manual explains how to override them (for example with a nodefault local zone) before a stub zone takes effect.

Bring it up and test it#

The Unbound docs recommend checking the configuration first and then running in the foreground with extra logging:

unbound-checkconf /etc/unbound/unbound.conf
unbound -d -vv -c /etc/unbound/unbound.conf

On many Linux hosts, systemd-resolved already listens on port 53 on a loopback address (commonly 127.0.0.53). The Unbound docs describe the resulting error when Unbound is told to listen on 0.0.0.0. Binding Unbound to the server's own LAN address and 127.0.0.1, as in the example above, avoids that clash; alternatively, reconfigure the stub resolver.

Then test from a client:

dig @192.0.2.53 isc.org A +dnssec
dig @192.0.2.53 dnssec-failed.org A

The first answer should show the ad (authenticated data) flag in the header. The second domain is deliberately misconfigured with broken DNSSEC, so a validating resolver should return SERVFAIL. If you get an address back for it, validation is not being applied to that name. With ede: yes set, the SERVFAIL should also carry an Extended DNS Error explaining the DNSSEC failure.

What changes for your users#

Very little, if it is done well. Two things do change:

  1. Broken DNSSEC becomes your problem. When a domain's operator breaks their own signatures, a validating resolver returns SERVFAIL for it. Validating public resolvers do the same. If a business-critical partner domain breaks, domain-insecure can switch validation off for that domain (and names under it) as a temporary exception. Write down why, and remove it when they fix it.
  2. You lose the public resolver's threat blocking. Quad9's default service blocks known malicious domains; Unbound does not do that by default. If you want it, Unbound supports Response Policy Zones (rpz:) with a feed you choose; per the manual this needs the respip module in module-config. That is a policy decision for your security team, not a default to copy.

Monitoring#

Watch three things: that both resolvers answer, the SERVFAIL rate, and cache hit rate. unbound-control stats_noreset gives the counters once remote control is set up (see the configuration guide for unbound-control-setup); per-rcode counts such as SERVFAIL need extended-statistics: yes. Sample the counters on a schedule and graph the differences. When SERVFAIL jumps, the usual suspects to check first are the resolver's network path, its clock, and a popular signed zone that has broken its DNSSEC.

Where this fits in the series#

DNS is the dependency people forget until it fails. Most other pieces of a bare-metal estate — package mirrors, certificate renewal, backups to an offsite box, monitoring alerts — need names to resolve. In my view, running your own resolvers is a small job next to everything else in a cloud exit: a pair of modest VMs per site and some careful testing, and the software is free. Part 3, host your own authoritative DNS, covers the other half: serving your own zones. A later chapter will cover designing offsite backups without a hyperscaler.

The know-how in this series stays free. If you would rather have the resolver design, the rollout and the rest of a cloud exit planned and built for you, NG-NeXT does consulting and turnkey builds. Tell us what you run today through the contact page.

— Nishant Gauraw, Founder and CEO, NG-NeXT Tech

Talk to us directly.

We reply within one business day. The site assistant answers at any hour.