Artica Wiki

Resolve names from the root servers

The DNS Firewall resolves names itself from the Internet root servers, with DNSSEC, internal names kept on your DNS servers and automatic fallback.

Back to the DNS Firewall service

Your own recursive DNS, inside the DNS Firewall

The DNS Firewall can now find every answer by itself.
It asks the Internet root servers first, then follows the chain down to the server that owns each domain, as Unbound does.
Public resolvers such as Google, Cloudflare or your provider stop receiving the names your users look up.
Every answer is checked with DNSSEC before it reaches a client.
Your firewall rules, forwarding zones and cache keep working exactly as before.
If the local resolver stops, the DNS Firewall sends queries to the DNS servers you already use.

You turn it on with one switch.
Artica installs, configures and watches everything else.

Benefits

Use cases

How it works

Artica runs a dedicated copy of Unbound named dns-root-hints.
It listens on 127.0.0.1, port 5399, and runs under the dnsroot account.
The DNS Firewall sends it every query that no firewall rule and no forwarding zone has claimed.

Client query
   |
   v
DNS Firewall (dnsdist)
   |-- 1. Firewall rules and forwarding zones ............ unchanged
   |-- 2. Internal names ---> pool "internal" ----------> your private DNS servers
   |-- 3. Other names -----> pool "roots" -------------> dns-root-hints 127.0.0.1:5399
   |                                                        |
   |                                                        v
   |                                     root servers > TLD servers > domain servers
   |-- 4. Resolver down ---> pool "defaults" ----------> your current DNS servers

Requirements

Enable root servers resolution

  1. Open DNS > DNS Load-balancing service.
  2. Click the Global settings tab.
  3. In the Load balancing and health checks card, click Edit.
  4. Turn on Resolve from the root servers.
  5. Click Apply.

The Load balancing and health checks window with the Resolve from the root servers switch

Applying restarts the DNS service once.
Answers pause for a few seconds.
Artica installs the resolver, downloads the root hints and creates the DNSSEC trust anchor.
It then starts the resolver and rebuilds the DNS Firewall configuration.
The whole operation took about 6 seconds on our test appliance.

The card shows On and Running when the resolver answers.
When Artica finds internal names, the card also lists them under Internal names forwarded.

The Load balancing and health checks card with root servers resolution on and running

The Global settings tab of the DNS Load-balancing service

Check that it works

The Status tab shows a pool named roots.
It holds one server, 127.0.0.1:5399, named dnsroots.
Its Queries counter grows as clients send queries.

The roots pool in the Status tab, next to the defaults pool

From the appliance console, you can query the resolver directly:

dig @127.0.0.1 -p 5399 www.debian.org A
dig @127.0.0.1 -p 5399 dnssec-failed.org A

The first command returns an address.
The second one returns SERVFAIL, because the domain has a broken DNSSEC signature on purpose.
That answer proves DNSSEC validation is active.

The resolver state is also available from the Artica REST API:

curl -s --unix-socket /usr/share/artica-postfix/bin/run/articarest.sock http://localhost/dnsroots/status

Internal names

The root servers know nothing about your internal domains.
A name such as corp.local would get a valid "does not exist" answer from the Internet.
To avoid that, Artica sends internal names to your private DNS servers.

Internal names are:

Private DNS servers are the servers of the system resolver configuration that use a private address (RFC 1918, 100.64.0.0/10 or IPv6 ULA).
Loopback addresses and the appliance's own addresses are not used.

A name covered by one of your forwarding zones stays on that zone.
If no private DNS server answers, internal names go to the defaults pool.
An internal name is never sent to the root servers.

When the resolver stops

The DNS Firewall checks the resolver with the health check settings of the Load balancing and health checks card.
With the default values, it asks for a.root-servers.net every 2 seconds, waits 3 seconds for an answer and marks the resolver down after 3 failures.

We stopped the resolver on a test appliance and measured the switch:

Monit restarts the resolver if its process stops (APP_DNS_ROOT_HINTS).

Limits

Disable root servers resolution

Turn off Resolve from the root servers and click Apply.
Artica rebuilds the DNS Firewall configuration first, so no query is sent to a stopping resolver.
It then removes the resolver, its configuration and its watchdog.
The dnsroot account stays on the system.

Artica Meta

The DNS Firewall policy of Artica Meta carries this setting as DNSDistEnableRootInts, in the load-balancing section.
While a policy holds it, the local console refuses the change with the message "managed by Artica Meta".

Reference

Item Value
Setting (Valkey key) DNSDistEnableRootInts (0 or 1)
Resolver binary /usr/local/bin/dns-root-hints (copy of /usr/sbin/unbound)
Listening address 127.0.0.1:5399
Account dnsroot
Configuration /etc/dns-root-hints/dns-root-hints.conf
Root hints /etc/dns-root-hints/root.hints, downloaded from internic.net and refreshed every 30 days
DNSSEC trust anchor /var/lib/dns-root-hints/root.key, updated automatically (RFC 5011)
Internal names found /etc/dns-root-hints/internal-forwards.json
Log file /var/log/dns-root-hints.log, rotated at 10 MB, 4 files kept
Watchdog Monit, APP_DNS_ROOT_HINTS
REST API GET /dnsroots/status, POST /dnsroots/enable with {"enabled":1} or {"enabled":0}

Command line:

/usr/sbin/articarest -install-dnsroots
/usr/sbin/articarest -uninstall-dnsroots
/usr/sbin/articarest -start-dnsroots
/usr/sbin/articarest -stop-dnsroots
/usr/sbin/articarest -restart-dnsroots
/usr/sbin/articarest -reconfigure-dnsroots
/usr/sbin/articarest -status-dnsroots

Troubleshooting

Symptom What to check
The card shows Stopped Read /var/log/dns-root-hints.log. Check that no other program listens on 127.0.0.1:5399.
Enabling fails with "unbound binary not found" Install the unbound package, then apply the setting again.
The roots pool stays at 0 queries A firewall rule or a forwarding zone claims the queries first.
An internal name does not resolve Check that the system resolver configuration lists a private DNS server. Check the Internal names forwarded list in the card.
One domain returns SERVFAIL Test it with dig @127.0.0.1 -p 5399 <domain>. A DNSSEC error on that domain is expected behavior.