<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Homelab DNS Guide: Local DNS Servers and Setup</title><description>Plain guides to local DNS servers and setup for homelabs, built from published official documentation.</description><link>https://homelabdnsguide.com/</link><language>en</language><atom:link href="https://homelabdnsguide.com/rss.xml" rel="self" type="application/rss+xml"/><item><title>Technitium DNS v14 Clustering and Split-Scope DHCP</title><link>https://homelabdnsguide.com/posts/technitium-dns-v14-native-clustering-split-scope-dhcp/</link><guid isPermaLink="true">https://homelabdnsguide.com/posts/technitium-dns-v14-native-clustering-split-scope-dhcp/</guid><description>Set up a two-node Technitium DNS v14 cluster, configure non-overlapping DHCP pools, and check whether DNS and new leases work with one node offline.</description><pubDate>Thu, 26 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Technitium DNS Server v14 uses native clustering to sync shared DNS settings across nodes. For DHCP redundancy on one IPv4 LAN, create an independent scope on each node with a different address range, and advertise both DNS servers from both scopes. The surviving DHCP server can issue leases from its own pool while it has free addresses. DHCP scopes and leases stay local to each node. &lt;a href=&quot;https://blog.technitium.com/2025/11/technitium-dns-server-v14-released.html?m=1&quot;&gt;Technitium v14 release notes&lt;/a&gt; · &lt;a href=&quot;https://github.com/TechnitiumSoftware/DnsServer/issues/1631&quot;&gt;Technitium DHCP maintainer notes&lt;/a&gt; · &lt;a href=&quot;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn338978%28v%3Dws.11%29&quot;&gt;Split-scope DHCP&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Initialize the primary and join the secondary&lt;/h2&gt;
&lt;p&gt;Use two existing v14.3.0 instances with fixed addresses on the same LAN. In this example, node A is at &lt;code&gt;192.168.50.2&lt;/code&gt; and node B at &lt;code&gt;192.168.50.3&lt;/code&gt;. Choose your &lt;strong&gt;Cluster Domain&lt;/strong&gt; before starting. Changing it later requires deleting and recreating the cluster. &lt;a href=&quot;https://blog.technitium.com/2025/11/understanding-clustering-and-how-to.html?m=0&quot;&gt;Technitium clustering guide&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;On A, sign in as an administrator and open &lt;strong&gt;Administration → Cluster → Initialize → New Cluster&lt;/strong&gt;. Enter the &lt;strong&gt;Cluster Domain&lt;/strong&gt; and put &lt;code&gt;192.168.50.2&lt;/code&gt; in &lt;strong&gt;Primary Node IP Addresses&lt;/strong&gt;. Click &lt;strong&gt;Initialize&lt;/strong&gt;, then copy the primary&apos;s HTTPS URL from &lt;strong&gt;Administration → Cluster&lt;/strong&gt;. &lt;a href=&quot;https://blog.technitium.com/2025/11/understanding-clustering-and-how-to.html?m=0&quot;&gt;Technitium clustering guide&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;On B, use &lt;strong&gt;Settings → Backup Settings&lt;/strong&gt; before joining. The join overwrites configuration on B for &lt;strong&gt;Allowed&lt;/strong&gt;, &lt;strong&gt;Blocked&lt;/strong&gt;, &lt;strong&gt;Apps&lt;/strong&gt;, &lt;strong&gt;Settings&lt;/strong&gt; and &lt;strong&gt;Administration&lt;/strong&gt;. &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;On B, open &lt;strong&gt;Administration → Cluster → Initialize → Join Cluster&lt;/strong&gt;. Enter &lt;code&gt;192.168.50.3&lt;/code&gt; in &lt;strong&gt;Secondary Node IP Addresses&lt;/strong&gt; and paste A&apos;s &lt;strong&gt;Primary Node URL&lt;/strong&gt;. If B cannot resolve the name in that URL, set &lt;strong&gt;Primary Node IP Address&lt;/strong&gt; to &lt;code&gt;192.168.50.2&lt;/code&gt;. &lt;a href=&quot;https://blog.technitium.com/2025/11/understanding-clustering-and-how-to.html?m=0&quot;&gt;Technitium clustering guide&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;For a private cluster, use a valid TLS certificate for HTTPS on A and keep certificate validation enabled when joining B. Enter A&apos;s administrator credentials and click &lt;strong&gt;Join&lt;/strong&gt;. If A&apos;s administrator account uses two-factor authentication, supply the one-time code when prompted. Allow the initial configuration sync to finish. &lt;a href=&quot;https://blog.technitium.com/2025/11/understanding-clustering-and-how-to.html?m=0&quot;&gt;Technitium clustering guide&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;Share a local DNS zone&lt;/h2&gt;
&lt;p&gt;On A, open an existing Primary zone under &lt;strong&gt;Zones&lt;/strong&gt;. In &lt;strong&gt;Options → Zone Options → General&lt;/strong&gt;, select &lt;code&gt;cluster-catalog.&amp;lt;your-cluster-domain&amp;gt;&lt;/code&gt; in &lt;strong&gt;Catalog Zone&lt;/strong&gt; and save. Check &lt;strong&gt;Zones&lt;/strong&gt; on B for the provisioned Secondary zone before relying on it to answer queries. &lt;a href=&quot;https://blog.technitium.com/2025/11/understanding-clustering-and-how-to.html?m=0&quot;&gt;Technitium clustering guide&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Create two DHCP scopes for one subnet&lt;/h2&gt;
&lt;p&gt;Use the example on a LAN where A and B will be the only DHCP servers. The router and static node addresses in this example sit outside both pools. Size each pool for the clients that may need addresses from that node during an outage. Clients can receive a different IP address when they obtain a lease from the other server. &lt;a href=&quot;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn338978%28v%3Dws.11%29&quot;&gt;Split-scope DHCP&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/APIDOCS.md&quot;&gt;Technitium DHCP scope options&lt;/a&gt;&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Open &lt;strong&gt;DHCP → Scopes&lt;/strong&gt; and select A in the node selector. Choose &lt;strong&gt;Add Scope&lt;/strong&gt; and enter A&apos;s values below. Repeat for B with B selected. &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;On both scopes, clear &lt;strong&gt;Use This DNS Server&lt;/strong&gt;. Enter both &lt;strong&gt;DNS Servers&lt;/strong&gt; addresses, one per line. This sets the DNS server list advertised to DHCP clients. &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/js/dhcp.js&quot;&gt;DHCP console controls&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/APIDOCS.md&quot;&gt;Technitium DHCP scope options&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Save&lt;/strong&gt; for each scope, then click &lt;strong&gt;Enable&lt;/strong&gt; on its row if it is disabled. &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/js/dhcp.js&quot;&gt;DHCP console controls&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Setting&lt;/th&gt;
&lt;th&gt;Node A&lt;/th&gt;
&lt;th&gt;Node B&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Name&lt;/td&gt;
&lt;td&gt;&lt;code&gt;lan-a&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;lan-b&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Starting Address&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.100&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.150&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Ending Address&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.149&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.199&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Subnet Mask&lt;/td&gt;
&lt;td&gt;&lt;code&gt;255.255.255.0&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;255.255.255.0&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Router Address&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.1&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.1&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DNS Servers&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.2&lt;/code&gt;, &lt;code&gt;192.168.50.3&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.2&lt;/code&gt;, &lt;code&gt;192.168.50.3&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;With &lt;strong&gt;Enable DNS Updates&lt;/strong&gt; on, the DHCP server can update only Primary or Forwarder zones on the same node. A lease issued by B can succeed even when B has only a Secondary copy of the client&apos;s zone and cannot register the name there. Use a manually managed record for the DNS check below. &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt; · &lt;a href=&quot;https://github.com/TechnitiumSoftware/DnsServer/issues/1631&quot;&gt;Technitium DHCP maintainer notes&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Check a one-node outage&lt;/h2&gt;
&lt;p&gt;Run the check on a test LAN or during a maintenance window. Start with both nodes online. From a LAN client with &lt;code&gt;dig&lt;/code&gt;, query each server directly, substituting a known A record from the catalog member zone for &lt;code&gt;router.lab.home.arpa&lt;/code&gt;. Confirm that both answers contain the expected address. &lt;a href=&quot;https://bind9.readthedocs.io/en/stable/manpages.html#dig-dns-lookup-utility&quot;&gt;ISC BIND dig manual&lt;/a&gt; · &lt;a href=&quot;https://blog.technitium.com/2025/11/understanding-clustering-and-how-to.html?m=0&quot;&gt;Technitium clustering guide&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;dig @192.168.50.2 router.lab.home.arpa A
dig @192.168.50.3 router.lab.home.arpa A
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;Take A offline. Connect a DHCP client with no current lease on the LAN and look for it in B&apos;s &lt;strong&gt;DHCP → Leases&lt;/strong&gt;. Check whether B issued an address from &lt;code&gt;192.168.50.150&lt;/code&gt; through &lt;code&gt;192.168.50.199&lt;/code&gt;. On the client, confirm it received both DNS addresses and run the query against B. &lt;a href=&quot;https://blog.technitium.com/2025/11/understanding-clustering-and-how-to.html?m=0&quot;&gt;Technitium clustering guide&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt; · &lt;a href=&quot;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn338978%28v%3Dws.11%29&quot;&gt;Split-scope DHCP&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Bring A back, then take B offline. Query A and use another fresh DHCP client. Check A&apos;s lease table for a new lease from &lt;code&gt;192.168.50.100&lt;/code&gt; through &lt;code&gt;192.168.50.149&lt;/code&gt;. Bring B back after the check. &lt;a href=&quot;https://blog.technitium.com/2025/11/understanding-clustering-and-how-to.html?m=0&quot;&gt;Technitium clustering guide&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt; · &lt;a href=&quot;https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/dn338978%28v%3Dws.11%29&quot;&gt;Split-scope DHCP&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The primary must be online to change shared cluster settings. For an unrecoverable primary, open &lt;strong&gt;Administration → Cluster&lt;/strong&gt; on B and choose &lt;strong&gt;Promote To Primary&lt;/strong&gt; from B&apos;s own node-row menu. If the old primary is unreachable or decommissioned and cannot be removed gracefully, select &lt;strong&gt;Force Delete Current Primary Node&lt;/strong&gt; in the confirmation dialog. This skips the standard resync from the old primary. Click &lt;strong&gt;Promote&lt;/strong&gt; to confirm. Promotion removes the old primary from the cluster, so leave it alone during a temporary outage check. &lt;a href=&quot;https://blog.technitium.com/2025/11/understanding-clustering-and-how-to.html?m=0&quot;&gt;Technitium clustering guide&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v14.3.0/DnsServerCore/www/index.html&quot;&gt;v14.3.0 console&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Evidence and limits. Technitium&apos;s v14 documentation and v14.3.0 console and API references were checked on November 26, 2026. The setup and outage checks were not run.&lt;/em&gt;&lt;/p&gt;
</content:encoded><category>technitium</category><category>dns</category><category>dhcp</category><category>clustering</category><author>Homelab DNS Guide Editorial</author></item><item><title>Authoritative Local DNS: Technitium, Pi-hole &amp; AdGuard Home</title><link>https://homelabdnsguide.com/posts/technitium-dns-pi-hole-adguard-home-authoritative-local/</link><guid isPermaLink="true">https://homelabdnsguide.com/posts/technitium-dns-pi-hole-adguard-home-authoritative-local/</guid><description>Compare Technitium, Pi-hole, and AdGuard Home for local DNS. Set up a primary zone or a host mapping, forward the zone, and verify it with dig.</description><pubDate>Thu, 26 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Choose Technitium DNS Server when your homelab needs an authoritative zone you can manage and transfer to a secondary server. For a few local names, use Pi-hole host records or AdGuard Home DNS rewrites. To keep your existing filter and manage a zone, forward queries for that zone to Technitium. &lt;a href=&quot;https://technitium.com/dns/help.html&quot;&gt;Technitium zones&lt;/a&gt; · &lt;a href=&quot;https://docs.pi-hole.net/ftldns/configfile/&quot;&gt;Pi-hole FTL settings&lt;/a&gt; · &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration&quot;&gt;AdGuard Home configuration&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Choose between local records and a zone&lt;/h2&gt;
&lt;p&gt;A host mapping tells your resolver which address to return for a name. A primary zone gives you a collection of records to manage under one DNS name, with its own Start of Authority (SOA) and name server (NS) records. &lt;a href=&quot;https://docs.pi-hole.net/ftldns/configfile/&quot;&gt;Pi-hole host settings&lt;/a&gt; · &lt;a href=&quot;https://blog.technitium.com/2022/06/how-to-self-host-your-own-domain-name.html&quot;&gt;Technitium zone guide&lt;/a&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;If you need&lt;/th&gt;
&lt;th&gt;Use&lt;/th&gt;
&lt;th&gt;Where the records live&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;A managed zone with SOA and NS records, or a zone that can transfer to a secondary&lt;/td&gt;
&lt;td&gt;Technitium &lt;strong&gt;Primary Zone&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Edit records in the primary zone. A secondary zone can receive a copy by zone transfer when the primary permits it. &lt;a href=&quot;https://technitium.com/dns/help.html&quot;&gt;Technitium help&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v15.6.2/DnsServerCore/www/index.html&quot;&gt;Technitium console&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A few hostnames on an existing Pi-hole&lt;/td&gt;
&lt;td&gt;Pi-hole &lt;code&gt;dns.hosts&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Keep the IP-to-name entries in Pi-hole. The separate &lt;code&gt;dns.cnameRecords&lt;/code&gt; setting handles aliases. &lt;a href=&quot;https://docs.pi-hole.net/ftldns/configfile/&quot;&gt;Pi-hole FTL reference&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;A few hostnames on an existing AdGuard Home server&lt;/td&gt;
&lt;td&gt;AdGuard Home &lt;strong&gt;DNS rewrites&lt;/strong&gt;&lt;/td&gt;
&lt;td&gt;Keep the domain and its answer in a rewrite. A legacy DNS rewrite accepts an IP address or a CNAME target as the answer. &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration&quot;&gt;AdGuard Home configuration&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;An existing filter and a dedicated zone&lt;/td&gt;
&lt;td&gt;Pi-hole or AdGuard Home in front of Technitium&lt;/td&gt;
&lt;td&gt;Keep the zone records in Technitium and add a domain-specific upstream on the filter. &lt;a href=&quot;https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html&quot;&gt;dnsmasq manual&lt;/a&gt; · &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#specifying-upstreams-for-domains&quot;&gt;AdGuard Home upstreams&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;Pi-hole FTL v6.9 embeds dnsmasq. Dnsmasq has a separate authoritative mode configured with &lt;code&gt;auth-server&lt;/code&gt; and &lt;code&gt;auth-zone&lt;/code&gt;. Technitium provides primary and secondary zones in its console. &lt;a href=&quot;https://pi-hole.net/blog/2026/11/11/pi-hole-ftl-v6-9-and-core-v6-6-released/&quot;&gt;Pi-hole FTL release notes&lt;/a&gt; · &lt;a href=&quot;https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html&quot;&gt;dnsmasq manual&lt;/a&gt; · &lt;a href=&quot;https://technitium.com/dns/help.html&quot;&gt;Technitium help&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Set up the same hostname three ways&lt;/h2&gt;
&lt;p&gt;The examples use &lt;code&gt;nas.lab.home.arpa&lt;/code&gt; for a service at &lt;code&gt;192.168.50.20&lt;/code&gt;. In the forwarding example, Technitium has its own address, &lt;code&gt;192.168.50.53&lt;/code&gt;. Substitute your own names and LAN addresses. Start with the DNS server already installed.&lt;/p&gt;
&lt;h3&gt;Technitium DNS Server&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;In the web console, open &lt;strong&gt;Zones → Add Zone&lt;/strong&gt;. Enter &lt;code&gt;lab.home.arpa&lt;/code&gt; in &lt;strong&gt;Zone&lt;/strong&gt;, select &lt;strong&gt;Primary Zone&lt;/strong&gt; for &lt;strong&gt;Type&lt;/strong&gt;, and click &lt;strong&gt;Add&lt;/strong&gt;. &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v15.6.2/DnsServerCore/www/index.html&quot;&gt;Technitium console&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Open the new zone and select &lt;strong&gt;Add Record&lt;/strong&gt;. Enter &lt;code&gt;nas&lt;/code&gt; in &lt;strong&gt;Name&lt;/strong&gt;, choose &lt;code&gt;A&lt;/code&gt; in &lt;strong&gt;Type&lt;/strong&gt;, and enter &lt;code&gt;192.168.50.20&lt;/code&gt; in &lt;strong&gt;IPv4 Address&lt;/strong&gt;. Click &lt;strong&gt;Save&lt;/strong&gt;. &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v15.6.2/DnsServerCore/www/index.html&quot;&gt;Technitium console&lt;/a&gt; · &lt;a href=&quot;https://raw.githubusercontent.com/TechnitiumSoftware/DnsServer/v15.6.2/DnsServerCore/www/js/zone.js&quot;&gt;Record editor&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;Confirm that the zone contains an SOA record, an NS record, and the new A record. The initial SOA and NS are created with the primary zone. &lt;a href=&quot;https://blog.technitium.com/2022/06/how-to-self-host-your-own-domain-name.html&quot;&gt;Technitium zone guide&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Pi-hole&lt;/h3&gt;
&lt;p&gt;On the Pi-hole host, set &lt;code&gt;dns.hosts&lt;/code&gt; with an IP followed by the full hostname. The command sets the entire array, so include any existing entries when adding yours. &lt;a href=&quot;https://docs.pi-hole.net/ftldns/configfile/#hosts&quot;&gt;Pi-hole FTL reference&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo pihole-FTL --config dns.hosts &apos;[&amp;quot;192.168.50.20 nas.lab.home.arpa&amp;quot;]&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;h3&gt;AdGuard Home&lt;/h3&gt;
&lt;p&gt;In AdGuard Home v1.0, open &lt;strong&gt;DNS rewrites&lt;/strong&gt; in the filters section and add an entry with &lt;code&gt;nas.lab.home.arpa&lt;/code&gt; as the domain and &lt;code&gt;192.168.50.20&lt;/code&gt; as the answer. &lt;a href=&quot;https://adguard.com/en/blog/adguard-home-v-1-0.html&quot;&gt;AdGuard Home v1.0 release notes&lt;/a&gt; · &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration&quot;&gt;AdGuard Home configuration&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Forward the zone from an existing filter&lt;/h2&gt;
&lt;p&gt;Leave clients pointed at their existing Pi-hole or AdGuard Home server. For the forwarding example, remove any host entry or rewrite for the same name from the filter. &lt;a href=&quot;https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html&quot;&gt;dnsmasq manual&lt;/a&gt; · &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration&quot;&gt;AdGuard Home configuration&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Pi-hole.&lt;/strong&gt; Add the following &lt;code&gt;server=&lt;/code&gt; line to the &lt;code&gt;misc.dnsmasq_lines&lt;/code&gt; array. The domain between the slashes scopes the forwarding rule to &lt;code&gt;lab.home.arpa&lt;/code&gt; and its subdomains. &lt;a href=&quot;https://docs.pi-hole.net/ftldns/configfile/#dnsmasq_lines&quot;&gt;Pi-hole FTL reference&lt;/a&gt; · &lt;a href=&quot;https://thekelleys.org.uk/dnsmasq/docs/dnsmasq-man.html&quot;&gt;dnsmasq manual&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Malformed directives or directives that conflict with Pi-hole’s generated configuration can stop DNS resolution. Back up the Pi-hole configuration under &lt;strong&gt;Settings → Teleporter&lt;/strong&gt; first and retain any existing entries in the array. &lt;a href=&quot;https://docs.pi-hole.net/ftldns/configfile/#dnsmasq_lines&quot;&gt;Pi-hole FTL reference&lt;/a&gt; · &lt;a href=&quot;https://pi-hole.net/blog/2026/11/11/pi-hole-ftl-v6-9-and-core-v6-6-released/&quot;&gt;Pi-hole backup instructions&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo pihole-FTL --config misc.dnsmasq_lines &apos;[&amp;quot;server=/lab.home.arpa/192.168.50.53&amp;quot;]&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;AdGuard Home.&lt;/strong&gt; In &lt;strong&gt;Settings → DNS settings&lt;/strong&gt;, append this entry to &lt;strong&gt;Upstream DNS servers&lt;/strong&gt; and keep the regular upstream entries for other names. &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/wiki/Configuration#specifying-upstreams-for-domains&quot;&gt;AdGuard Home upstreams&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;[/lab.home.arpa/]192.168.50.53
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Verify authority and client resolution&lt;/h2&gt;
&lt;p&gt;For the zone setup, query Technitium directly. The &lt;code&gt;+norecurse&lt;/code&gt; option clears the recursion-desired flag in the query. Look for &lt;code&gt;aa&lt;/code&gt; in the response flags, an SOA record at &lt;code&gt;lab.home.arpa&lt;/code&gt;, and an A record of &lt;code&gt;192.168.50.20&lt;/code&gt; for the host. &lt;a href=&quot;https://bind9.readthedocs.io/en/v9.20.31/manpages.html#dig-dns-lookup-utility&quot;&gt;BIND dig manual&lt;/a&gt; · &lt;a href=&quot;https://bind9.readthedocs.io/en/v9.20.31/dnssec-guide.html#query-path&quot;&gt;BIND query path guide&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;dig @192.168.50.53 lab.home.arpa. SOA +norecurse
dig @192.168.50.53 nas.lab.home.arpa. A +norecurse
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;To check what clients can resolve, use a LAN client configured to query your chosen DNS service. Run the lookup without &lt;code&gt;@&lt;/code&gt; and check that the answer contains &lt;code&gt;192.168.50.20&lt;/code&gt;. If it fails, repeat with &lt;code&gt;@&lt;/code&gt; followed by the client-facing DNS server IP to check that server directly. &lt;a href=&quot;https://bind9.readthedocs.io/en/v9.20.31/manpages.html#dig-dns-lookup-utility&quot;&gt;BIND dig manual&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;dig nas.lab.home.arpa. A
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Evidence and limits.&lt;/strong&gt; The Technitium v15.6.2 console, BIND 9.20.31 manuals, Pi-hole FTL configuration reference and v6.9 release notes, and AdGuard Home configuration wiki and v1.0 release notes were checked on November 26, 2026. The example configurations and commands were not run for this article.&lt;/p&gt;
</content:encoded><category>dns</category><category>homelab</category><category>technitium</category><category>pi-hole</category><category>adguard-home</category><author>Homelab DNS Guide Editorial</author></item><item><title>DNS-over-HTTPS and DNS-over-TLS Forwarders at Home</title><link>https://homelabdnsguide.com/posts/configuring-dns-over-https-dns-over-tls-forwarders/</link><guid isPermaLink="true">https://homelabdnsguide.com/posts/configuring-dns-over-https-dns-over-tls-forwarders/</guid><description>Set up DNS-over-HTTPS or DNS-over-TLS forwarding in AdGuard Home with Quad9, then verify the upstream protocol from a device on your network.</description><pubDate>Thu, 26 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;To forward home DNS over HTTPS or TLS, enter a Quad9 endpoint under &lt;strong&gt;Upstream DNS servers&lt;/strong&gt; in AdGuard Home and point your devices at AdGuard Home’s LAN IP. Queries forwarded to Quad9 over either protocol are encrypted between AdGuard Home and Quad9. &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/configuration/&quot;&gt;AdGuard Home upstream configuration&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Start with AdGuard Home running on your network. Use the &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/getting-started/&quot;&gt;AdGuard Home setup guide&lt;/a&gt; for installation or the &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/encryption/&quot;&gt;DNS encryption guide&lt;/a&gt; to configure encryption between your devices and AdGuard Home.&lt;/p&gt;
&lt;h2&gt;Set the Quad9 upstream&lt;/h2&gt;
&lt;p&gt;Open &lt;strong&gt;Settings → DNS settings&lt;/strong&gt;. If you configure your upstreams in the web interface, replace the existing general-purpose entries in &lt;strong&gt;Upstream DNS servers&lt;/strong&gt; with one line from this table. Keep any domain-specific entries that send local names to a private resolver. &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/faq/&quot;&gt;AdGuard Home FAQ&lt;/a&gt;, &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/configuration/&quot;&gt;upstream configuration&lt;/a&gt;&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Protocol&lt;/th&gt;
&lt;th&gt;Upstream DNS servers entry&lt;/th&gt;
&lt;th&gt;Quad9 TCP port&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;DNS-over-HTTPS (DoH)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;https://dns.quad9.net/dns-query&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;443&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DNS-over-TLS (DoT)&lt;/td&gt;
&lt;td&gt;&lt;code&gt;tls://dns.quad9.net&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;853&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;&lt;a href=&quot;https://adguard-dns.io/kb/general/dns-providers/#quad9-dns&quot;&gt;AdGuard’s Quad9 endpoint list&lt;/a&gt; gives the exact entries. &lt;a href=&quot;https://docs.quad9.net/FAQs/#protocol-test-confirm-on-which-protocol-quad9-received-your-query&quot;&gt;Quad9’s protocol documentation&lt;/a&gt; lists the ports.&lt;/p&gt;
&lt;p&gt;Under &lt;strong&gt;Bootstrap DNS servers&lt;/strong&gt;, enter &lt;code&gt;9.9.9.9&lt;/code&gt; and &lt;code&gt;149.112.112.112&lt;/code&gt;, one IP per line. AdGuard Home uses these plain DNS servers for the initial lookup of the upstream hostname. &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/configuration/&quot;&gt;AdGuard Home upstream configuration&lt;/a&gt;, &lt;a href=&quot;https://adguard-dns.io/kb/general/dns-providers/#quad9-dns&quot;&gt;AdGuard’s Quad9 endpoint list&lt;/a&gt;, &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/blob/v1.0.0/client/src/__locales/en.json&quot;&gt;AdGuard Home v1.0.0 interface labels&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Leave &lt;strong&gt;Fallback DNS servers&lt;/strong&gt; empty for this setup. AdGuard Home uses that field when upstream servers fail to respond. A plain DNS entry there would allow unencrypted forwarding when the upstream servers do not respond. &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/configuration/&quot;&gt;AdGuard Home upstream configuration&lt;/a&gt;, &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/blob/v1.0.0/client/src/__locales/en.json&quot;&gt;AdGuard Home v1.0.0 interface labels&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Click &lt;strong&gt;Test upstreams&lt;/strong&gt;. Once it passes, click &lt;strong&gt;Apply&lt;/strong&gt; in the upstream section. &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/blob/v1.0.0/client/src/components/Settings/Dns/Upstream/Form.tsx&quot;&gt;AdGuard Home upstream settings form&lt;/a&gt;, &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/blob/v1.0.0/client/src/__locales/en.json&quot;&gt;interface labels&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Point home devices at AdGuard Home&lt;/h2&gt;
&lt;p&gt;If your router supports custom DNS, enter the LAN IP of AdGuard Home in the router’s DHCP/DNS settings. To try the setup on one device first, enter the same LAN IP in that device’s DNS settings. &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/getting-started/&quot;&gt;AdGuard Home device setup&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Verify the protocol Quad9 receives&lt;/h2&gt;
&lt;p&gt;If you’re switching protocols, click &lt;strong&gt;Clear cache&lt;/strong&gt; under &lt;strong&gt;DNS cache configuration&lt;/strong&gt; and confirm before retesting. This removes cached DNS answers from AdGuard Home. &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/blob/v1.0.0/client/src/components/Settings/Dns/Cache/Form.tsx&quot;&gt;AdGuard Home cache controls&lt;/a&gt;, &lt;a href=&quot;https://github.com/AdguardTeam/AdGuardHome/blob/v1.0.0/client/src/__locales/en.json&quot;&gt;interface labels&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;From a device using AdGuard Home for DNS, run the command for your operating system. &lt;a href=&quot;https://docs.quad9.net/FAQs/#protocol-test-confirm-on-which-protocol-quad9-received-your-query&quot;&gt;Quad9 protocol test&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;macOS or Linux&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;dig +short txt proto.on.quad9.net.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Windows PowerShell&lt;/strong&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-powershell&quot;&gt;Resolve-DnsName -Type txt proto.on.quad9.net.
&lt;/code&gt;&lt;/pre&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;doh&lt;/code&gt; means Quad9 received the query over DNS-over-HTTPS.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;dot&lt;/code&gt; means Quad9 received it over DNS-over-TLS.&lt;/li&gt;
&lt;li&gt;&lt;code&gt;do53-udp&lt;/code&gt; or &lt;code&gt;do53-tcp&lt;/code&gt; means Quad9 received it over plain DNS.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If the result differs from the protocol you selected, look for &lt;code&gt;proto.on.quad9.net&lt;/code&gt; in &lt;strong&gt;Query Log&lt;/strong&gt; if logging is enabled. If the query appears and Quad9 reports plain DNS, recheck the upstream and fallback entries for plain DNS addresses. &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/faq/&quot;&gt;AdGuard Home FAQ&lt;/a&gt;, &lt;a href=&quot;https://adguard-dns.io/kb/adguard-home/configuration/&quot;&gt;upstream configuration&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evidence and limits.&lt;/strong&gt; The AdGuard Home v1.0.0 interface and the AdGuard and Quad9 documentation were checked on November 26, 2026. The setup and verification steps were not run.&lt;/p&gt;
</content:encoded><category>dns</category><category>doh</category><category>dot</category><category>adguard-home</category><category>quad9</category><author>Homelab DNS Guide Editorial</author></item><item><title>Split-Horizon DNS for Reverse Proxies and VPN Clients</title><link>https://homelabdnsguide.com/posts/split-horizon-local-dns-setup-reverse-proxies-vpn/</link><guid isPermaLink="true">https://homelabdnsguide.com/posts/split-horizon-local-dns-setup-reverse-proxies-vpn/</guid><description>Use Pi-hole, Caddy, and Tailscale to keep one app URL on your LAN and VPN. Configure DNS and routes, then check public DNS and HTTPS separately.</description><pubDate>Thu, 26 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;To set up split-horizon DNS, make your local resolver return the reverse proxy’s private IP for the app’s hostname. Have VPN clients send queries for that domain to the same resolver and give them a route to the proxy. For a private-only app, leave the name out of public DNS. &lt;a href=&quot;https://tailscale.com/learn/why-split-dns&quot;&gt;Tailscale split DNS guide&lt;/a&gt; · &lt;a href=&quot;https://tailscale.com/docs/features/subnet-routers&quot;&gt;Tailscale subnet router guide&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Choose the DNS answers&lt;/h2&gt;
&lt;p&gt;This IPv4 example starts with Pi-hole at &lt;code&gt;192.168.50.53&lt;/code&gt;, Caddy at &lt;code&gt;192.168.50.10&lt;/code&gt;, and an HTTP app listening at &lt;code&gt;127.0.0.1:8080&lt;/code&gt; on the Caddy host. It uses an existing tailnet with a Linux device on the LAN and assumes Caddy runs under its official systemd service. Substitute your own addresses, app port, and domain throughout.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Client&lt;/th&gt;
&lt;th&gt;Resolver for &lt;code&gt;app.lab.example.com&lt;/code&gt;&lt;/th&gt;
&lt;th&gt;Expected answer&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Home LAN&lt;/td&gt;
&lt;td&gt;Pi-hole at &lt;code&gt;192.168.50.53&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.10&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Away with Tailscale connected&lt;/td&gt;
&lt;td&gt;Pi-hole via a restricted nameserver for &lt;code&gt;lab.example.com&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;192.168.50.10&lt;/code&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Away with VPN disconnected&lt;/td&gt;
&lt;td&gt;Public DNS&lt;/td&gt;
&lt;td&gt;No public address for this private app. If the hostname has a public address record, expect its public DNS answer.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;p&gt;The local record sends browsers to Caddy. The proxy then forwards the request to the app’s configured upstream. &lt;a href=&quot;https://tailscale.com/learn/why-split-dns&quot;&gt;Tailscale split DNS guide&lt;/a&gt; · &lt;a href=&quot;https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#examples&quot;&gt;Caddy reverse_proxy examples&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Add the local record in Pi-hole&lt;/h2&gt;
&lt;p&gt;On the Pi-hole host, add the app hostname and the proxy’s LAN address to the &lt;code&gt;dns.hosts&lt;/code&gt; list. Use the command below to set the entire list if &lt;code&gt;dns.hosts&lt;/code&gt; is editable in the CLI. If &lt;code&gt;FTLCONF_dns_hosts&lt;/code&gt; is set, &lt;code&gt;dns.hosts&lt;/code&gt; is read-only in the CLI. If you already have local records, keep those entries in the array and add the new one. &lt;a href=&quot;https://docs.pi-hole.net/ftldns/configfile/#hosts&quot;&gt;Pi-hole dns.hosts configuration&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo pihole-FTL --config dns.hosts &apos;[&amp;quot;192.168.50.10 app.lab.example.com&amp;quot;]&apos;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Set your router’s LAN DHCP settings to give clients &lt;code&gt;192.168.50.53&lt;/code&gt; as their DNS server. For a trial on one device, set that device’s DNS server to &lt;code&gt;192.168.50.53&lt;/code&gt; manually. &lt;a href=&quot;https://docs.pi-hole.net/main/post-install/&quot;&gt;Pi-hole post-install configuration&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Configure Caddy for the same hostname&lt;/h2&gt;
&lt;p&gt;Add this site block to &lt;code&gt;/etc/caddy/Caddyfile&lt;/code&gt;. The site address matches the DNS name. The upstream is the app’s loopback address and port as seen from Caddy. &lt;a href=&quot;https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#examples&quot;&gt;Caddy reverse_proxy examples&lt;/a&gt; · &lt;a href=&quot;https://caddyserver.com/docs/running#using-the-service&quot;&gt;Caddy service configuration&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-caddyfile&quot;&gt;app.lab.example.com {
    tls internal
    reverse_proxy 127.0.0.1:8080
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Reload the official Caddy service after saving the file. &lt;a href=&quot;https://caddyserver.com/docs/running#using-the-service&quot;&gt;Caddy service configuration&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo systemctl reload caddy
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With &lt;code&gt;tls internal&lt;/code&gt;, Caddy issues the certificate from its own CA. On the official systemd service, get the root certificate from &lt;code&gt;/var/lib/caddy/.local/share/caddy/pki/authorities/local/root.crt&lt;/code&gt;. Install it in the trust store used by each LAN or VPN browser that will open the app. &lt;a href=&quot;https://caddyserver.com/docs/caddyfile/directives/tls&quot;&gt;Caddy TLS directive&lt;/a&gt; · &lt;a href=&quot;https://caddyserver.com/docs/running#local-https-with-systemd&quot;&gt;Caddy local HTTPS with systemd&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For clients that need a publicly trusted certificate, Caddy can use the ACME DNS challenge for a domain you control. The challenge checks authoritative DNS for a specific TXT record, so the CA can issue a certificate without inbound access to Caddy. &lt;a href=&quot;https://caddyserver.com/docs/automatic-https#dns-challenge&quot;&gt;Caddy DNS challenge&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;Route VPN traffic to Pi-hole and Caddy&lt;/h2&gt;
&lt;p&gt;On the Linux subnet router, enable IPv4 forwarding if it is disabled. Keep the firewall’s default forwarding policy set to deny. On most Linux systems with &lt;code&gt;/etc/sysctl.d&lt;/code&gt;, use the following commands. &lt;a href=&quot;https://tailscale.com/docs/features/subnet-routers#enable-ip-forwarding&quot;&gt;Tailscale IP forwarding instructions&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;echo &apos;net.ipv4.ip_forward = 1&apos; | sudo tee -a /etc/sysctl.d/99-tailscale.conf
sudo sysctl -p /etc/sysctl.d/99-tailscale.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Advertise routes for both hosts. If the router already advertises other routes, include those routes in the comma-separated list. If the routes still need approval, open &lt;strong&gt;Machines&lt;/strong&gt; in the Tailscale admin console, select the router, and approve both routes in &lt;strong&gt;Subnets&lt;/strong&gt;. Select &lt;strong&gt;Save&lt;/strong&gt;. &lt;a href=&quot;https://tailscale.com/docs/features/subnet-routers#advertise-subnet-routes&quot;&gt;Tailscale route advertisement and approval&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo tailscale set --advertise-routes=192.168.50.53/32,192.168.50.10/32
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If your tailnet policy needs rules for these destinations, add the two objects below to its &lt;code&gt;grants&lt;/code&gt; array in &lt;strong&gt;Access controls&lt;/strong&gt;. Replace &lt;code&gt;group:homelab&lt;/code&gt; with an existing group authorized to use the app. With source NAT enabled, the default for Tailscale subnet routes, the hosts see the traffic as coming from the subnet router. &lt;a href=&quot;https://tailscale.com/docs/features/subnet-routers&quot;&gt;Tailscale subnet routing and access rules&lt;/a&gt; · &lt;a href=&quot;https://tailscale.com/docs/reference/syntax/grants&quot;&gt;Tailscale grants syntax&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-json&quot;&gt;[
  {
    &amp;quot;src&amp;quot;: [&amp;quot;group:homelab&amp;quot;],
    &amp;quot;dst&amp;quot;: [&amp;quot;192.168.50.53&amp;quot;],
    &amp;quot;ip&amp;quot;: [&amp;quot;udp:53&amp;quot;, &amp;quot;tcp:53&amp;quot;]
  },
  {
    &amp;quot;src&amp;quot;: [&amp;quot;group:homelab&amp;quot;],
    &amp;quot;dst&amp;quot;: [&amp;quot;192.168.50.10&amp;quot;],
    &amp;quot;ip&amp;quot;: [&amp;quot;tcp:443&amp;quot;]
  }
]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;On a Linux VPN client, enable use of the advertised routes. &lt;a href=&quot;https://tailscale.com/docs/features/subnet-routers#use-your-subnet-routes-from-other-devices&quot;&gt;Tailscale client route settings&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;sudo tailscale set --accept-routes
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Send the lab domain to Pi-hole over Tailscale&lt;/h2&gt;
&lt;p&gt;In the Tailscale admin console, open &lt;strong&gt;DNS&lt;/strong&gt; and choose &lt;strong&gt;Add nameserver&lt;/strong&gt; → &lt;strong&gt;Custom&lt;/strong&gt;. Enter &lt;code&gt;192.168.50.53&lt;/code&gt;, enable &lt;strong&gt;Restrict to search domain&lt;/strong&gt;, enter &lt;code&gt;lab.example.com&lt;/code&gt;, and save. This nameserver applies to matching queries such as &lt;code&gt;app.lab.example.com&lt;/code&gt;. &lt;a href=&quot;https://tailscale.com/docs/solutions/kubernetes-operator-byod-gateway-api&quot;&gt;Tailscale setup steps&lt;/a&gt; · &lt;a href=&quot;https://tailscale.com/docs/reference/dns-in-tailscale#restricted-nameservers&quot;&gt;Tailscale restricted nameservers&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;On the VPN client, enable &lt;strong&gt;Use Tailscale DNS settings&lt;/strong&gt; or use the CLI below. If you use an exit node, it handles DNS by default. Enable &lt;strong&gt;Use with exit node&lt;/strong&gt; for this nameserver if the client should keep using it with the exit node active. &lt;a href=&quot;https://tailscale.com/docs/features/client/manage-preferences#use-tailscale-dns-settings&quot;&gt;Tailscale client preferences&lt;/a&gt; · &lt;a href=&quot;https://tailscale.com/docs/reference/dns-in-tailscale#nameservers-and-exit-nodes&quot;&gt;Tailscale exit-node DNS settings&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;tailscale set --accept-dns=true
&lt;/code&gt;&lt;/pre&gt;
&lt;h2&gt;Verify DNS and HTTPS separately&lt;/h2&gt;
&lt;p&gt;On the LAN, then from another network with Tailscale connected, query Pi-hole directly using a client with &lt;code&gt;dig&lt;/code&gt;. The example should return &lt;code&gt;192.168.50.10&lt;/code&gt;. If the direct query works at home but times out on the VPN, check the route to Pi-hole and access to its DNS port. &lt;a href=&quot;https://developers.cloudflare.com/1.1.1.1/troubleshooting/#name-resolution-issues&quot;&gt;Cloudflare direct resolver queries&lt;/a&gt; · &lt;a href=&quot;https://tailscale.com/docs/features/subnet-routers&quot;&gt;Tailscale subnet router guide&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;dig app.lab.example.com @192.168.50.53
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Next, check the client’s normal DNS path. On macOS, Tailscale recommends the native lookup below for split DNS. Expect the same address. If the direct query works but this lookup fails on the VPN, check that the client accepts Tailscale DNS and that the restricted domain matches the hostname. &lt;a href=&quot;https://tailscale.com/docs/reference/dns-in-tailscale#test-dns-configurations&quot;&gt;Tailscale DNS tests&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;dscacheutil -q host -a name app.lab.example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;From another network with the VPN off, query both public address record types. Compare the answers with the public row in the table. &lt;a href=&quot;https://developers.cloudflare.com/1.1.1.1/troubleshooting/#name-resolution-issues&quot;&gt;Cloudflare DNS resolver troubleshooting&lt;/a&gt; · &lt;a href=&quot;https://bind9.readthedocs.io/en/stable/manpages.html#dig-dns-lookup-utility&quot;&gt;BIND dig manual&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;dig @1.1.1.1 app.lab.example.com A
dig @1.1.1.1 app.lab.example.com AAAA
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Back on the LAN or connected to Tailscale, open &lt;code&gt;https://app.lab.example.com/&lt;/code&gt; in a browser that trusts Caddy’s CA. If it fails, use the two curl commands below with the copied &lt;code&gt;root.crt&lt;/code&gt; in your working directory. The second command supplies the proxy IP directly for that host and port while using the same HTTPS URL. &lt;a href=&quot;https://caddyserver.com/docs/running#local-https-with-systemd&quot;&gt;Caddy local HTTPS with systemd&lt;/a&gt; · &lt;a href=&quot;https://curl.se/docs/manpage.html&quot;&gt;curl manual&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-sh&quot;&gt;curl --cacert root.crt https://app.lab.example.com/
curl --cacert root.crt --resolve app.lab.example.com:443:192.168.50.10 https://app.lab.example.com/
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If only the second request works, check which address the normal lookup returns. If both requests time out over the VPN, check the route and the tailnet access rules for Caddy. If curl reports a certificate error, check the root certificate and confirm the URL’s hostname matches the Caddy site’s hostname. &lt;a href=&quot;https://curl.se/docs/manpage.html&quot;&gt;curl manual&lt;/a&gt; · &lt;a href=&quot;https://tailscale.com/docs/features/subnet-routers&quot;&gt;Tailscale subnet router guide&lt;/a&gt; · &lt;a href=&quot;https://caddyserver.com/docs/caddyfile/directives/tls&quot;&gt;Caddy TLS directive&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;If Caddy responds but the app does not load, check the upstream address and port in &lt;code&gt;reverse_proxy&lt;/code&gt;. &lt;a href=&quot;https://caddyserver.com/docs/caddyfile/directives/reverse_proxy#examples&quot;&gt;Caddy reverse_proxy examples&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evidence and limits.&lt;/strong&gt; Pi-hole v6, Caddy v2, Tailscale, Cloudflare, BIND 9, and curl documentation was checked on November 26, 2026. The steps were documented without a lab run.&lt;/p&gt;
</content:encoded><category>split-horizon</category><category>local-dns</category><category>reverse-proxy</category><category>vpn</category><author>Homelab DNS Guide Editorial</author></item><item><title>Unbound Recursive DNS Resolver With DNSSEC Validation</title><link>https://homelabdnsguide.com/posts/running-unbound-recursive-dns-resolver-dnssec-validation/</link><guid isPermaLink="true">https://homelabdnsguide.com/posts/running-unbound-recursive-dns-resolver-dnssec-validation/</guid><description>Configure Unbound as a recursive DNS resolver with DNSSEC validation using unbound-anchor, access controls, systemd-resolved, and dig checks.</description><pubDate>Thu, 26 Nov 2026 00:00:00 GMT</pubDate><content:encoded>&lt;p&gt;Unbound resolves DNS queries recursively and caches the answers. The default module configuration includes the validator. Configure a root trust anchor via &lt;code&gt;auto-trust-anchor-file:&lt;/code&gt; so Unbound can validate DNSSEC chains back to the root. Built-in root hints let Unbound start resolution at the DNS root. On a Linux homelab host, install Unbound, confirm it has a writable &lt;code&gt;root.key&lt;/code&gt;, and configure interfaces and &lt;code&gt;access-control:&lt;/code&gt; in &lt;code&gt;unbound.conf&lt;/code&gt;. If &lt;code&gt;systemd-resolved&lt;/code&gt; already occupies the address and port Unbound needs, free port 53 on that address. Run &lt;code&gt;unbound-checkconf&lt;/code&gt; and verify validation with &lt;code&gt;unbound-host&lt;/code&gt; and &lt;code&gt;dig&lt;/code&gt;.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Evidence and limits:&lt;/strong&gt; This guide is compiled from NLnet Labs Unbound documentation, including its Ubuntu 22.04 LTS home resolver example, IANA root file documentation, and the ISC BIND 9 DNSSEC Guide (9.21.29-dev). These sources were checked on 2026-11-26. The guide is not based on hands-on testing. Default file paths can vary by operating system package.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;Install Unbound&lt;/h2&gt;
&lt;p&gt;NLnet Labs recommends installing Unbound through your operating system package manager if you’re a first-time user. See the &lt;a href=&quot;https://unbound.docs.nlnetlabs.nl/en/latest/getting-started/installation.html&quot;&gt;Unbound Installation guide&lt;/a&gt;. On Ubuntu, run these commands.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo apt update
sudo apt install unbound
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The macOS Big Sur example installs Unbound with &lt;code&gt;brew install unbound&lt;/code&gt;. Building from source requires the OpenSSL and Expat libraries and their header files.&lt;/p&gt;
&lt;p&gt;The Ubuntu home resolver setup uses &lt;code&gt;/etc/unbound/unbound.conf&lt;/code&gt;. The source installation example uses &lt;code&gt;/usr/local/etc/unbound/unbound.conf&lt;/code&gt;. See the &lt;a href=&quot;https://unbound.docs.nlnetlabs.nl/en/latest/getting-started/configuration.html&quot;&gt;Unbound Configuration guide&lt;/a&gt; for the settings to put in that file.&lt;/p&gt;
&lt;h2&gt;Initialize and maintain the root trust anchor&lt;/h2&gt;
&lt;p&gt;The default validator needs a root trust anchor to verify chains of trust back to the root zone. &lt;code&gt;auto-trust-anchor-file:&lt;/code&gt; tracks and updates keys automatically during normal operation using RFC 5011.&lt;/p&gt;
&lt;p&gt;On Ubuntu 22.04 LTS, the Unbound package creates &lt;code&gt;/var/lib/unbound/root.key&lt;/code&gt;. Before applying the sample configuration, open &lt;code&gt;/etc/unbound/unbound.conf&lt;/code&gt; and follow the package’s existing configuration include to check the trust-anchor setting. If the include already sets &lt;code&gt;auto-trust-anchor-file:&lt;/code&gt;, keep that setting and omit the sample line. If you need to add the setting on a host-only resolver, add the sample’s &lt;code&gt;auto-trust-anchor-file:&lt;/code&gt; line under &lt;code&gt;server:&lt;/code&gt; and keep the loopback listener. Wherever the example uses &lt;code&gt;/var/lib/unbound/root.key&lt;/code&gt;, substitute the actual package anchor path if it differs.&lt;/p&gt;
&lt;p&gt;If the file needs initialization or an update, use &lt;code&gt;unbound-anchor&lt;/code&gt; before starting Unbound, as documented in the &lt;a href=&quot;https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound-anchor.html&quot;&gt;unbound-anchor(8) manual&lt;/a&gt;. Run it with &lt;code&gt;-a&lt;/code&gt; to specify the file path and &lt;code&gt;-v&lt;/code&gt; to print status details (without &lt;code&gt;-v&lt;/code&gt;, &lt;code&gt;unbound-anchor&lt;/code&gt; prints almost nothing and is silent on errors):&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo -u unbound unbound-anchor -v -a &amp;quot;/var/lib/unbound/root.key&amp;quot;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;If you maintain an explicit root hints file, pass &lt;code&gt;-r /path/to/root.hints&lt;/code&gt;; otherwise &lt;code&gt;unbound-anchor&lt;/code&gt; uses built-in root hints. If the key file is missing or empty, &lt;code&gt;unbound-anchor&lt;/code&gt; writes a built-in root key. When an RFC 5011 update fails to bring the anchor up to date, it attempts an HTTPS update using &lt;code&gt;root-anchors.xml&lt;/code&gt; and &lt;code&gt;root-anchors.p7s&lt;/code&gt; under RFC 7958. By default, it verifies the download against &lt;code&gt;icannbundle.pem&lt;/code&gt; and uses a built-in certificate if that file is absent or empty.&lt;/p&gt;
&lt;p&gt;Pay attention to &lt;code&gt;unbound-anchor&lt;/code&gt; exit codes when scripting startup checks:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Exit code &lt;code&gt;1&lt;/code&gt;&lt;/strong&gt; means the root anchor was updated using the certificate or the built-in root anchor was used.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Exit code &lt;code&gt;0&lt;/code&gt;&lt;/strong&gt; means no update was needed, an update was possible via RFC 5011 tracking, or an error occurred.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Before moving on, confirm that Unbound can access and update the trust anchor:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The account running Unbound can read and write &lt;code&gt;root.key&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;The account can write to the directory containing &lt;code&gt;root.key&lt;/code&gt; so Unbound can create a temporary file there.&lt;/li&gt;
&lt;li&gt;If Unbound runs in a chroot, keep &lt;code&gt;root.key&lt;/code&gt; inside it.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;Configure recursive resolution, access control, and DNSSEC&lt;/h2&gt;
&lt;p&gt;By default, Unbound listens on localhost on port &lt;code&gt;53&lt;/code&gt;. Its access rules implicitly allow &lt;code&gt;127.0.0.0/8&lt;/code&gt; and refuse other addresses. To serve a home network with DNSSEC validation and &lt;code&gt;unbound-control&lt;/code&gt; enabled, use these settings in your main configuration file, such as &lt;code&gt;/etc/unbound/unbound.conf&lt;/code&gt;. On Ubuntu, complete the local resolver handoff below before applying these settings.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-text&quot;&gt;server:
    # Track the root trust anchor with RFC 5011
    auto-trust-anchor-file: &amp;quot;/var/lib/unbound/root.key&amp;quot;

    # Send as little information as possible to upstream servers
    qname-minimisation: yes

    # Listen on all IPv4 interfaces
    interface: 0.0.0.0
    # interface: ::0

    # Permit IPv4 loopback and your local subnet
    access-control: 127.0.0.0/8 allow
    access-control: 192.168.0.0/16 allow
    # access-control: 2001:db8::/64 allow

    # Refuse id.server, hostname.bind, version.server, and version.bind
    hide-identity: yes
    hide-version: yes

remote-control:
    # Enable management with unbound-control
    control-enable: yes
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Security warning.&lt;/strong&gt; When listening on all IPv4 or IPv6 addresses, limit &lt;code&gt;access-control:&lt;/code&gt; to loopback and your LAN subnets. Never run an open recursive resolver reachable from outside your network.&lt;/p&gt;
&lt;p&gt;Additional configuration files can be loaded with the &lt;code&gt;include:&lt;/code&gt; directive. If you prefer an externally maintained file, download the root hints file and point &lt;code&gt;root-hints:&lt;/code&gt; to its path. The file lists the names and IP addresses of the root name servers. The download is on the &lt;a href=&quot;https://www.iana.org/domains/root/files&quot;&gt;IANA Root Files&lt;/a&gt; page.&lt;/p&gt;
&lt;h3&gt;Key &lt;code&gt;unbound.conf&lt;/code&gt; defaults and options&lt;/h3&gt;
&lt;p&gt;The &lt;a href=&quot;https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html&quot;&gt;unbound.conf(5) manual&lt;/a&gt; lists these defaults.&lt;/p&gt;
&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Directive&lt;/th&gt;
&lt;th&gt;Published default&lt;/th&gt;
&lt;th&gt;Effect&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;interface:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Localhost&lt;/td&gt;
&lt;td&gt;Sets listening addresses. Use a LAN IP or &lt;code&gt;0.0.0.0&lt;/code&gt; to serve other hosts.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;port:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;53&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Listening port for DNS queries&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;do-ip4:&lt;/code&gt;, &lt;code&gt;do-ip6:&lt;/code&gt;, &lt;code&gt;do-udp:&lt;/code&gt;, &lt;code&gt;do-tcp:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Enables IPv4, IPv6, UDP, and TCP query handling&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;access-control:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;refuse&lt;/code&gt; globally (&lt;code&gt;127.0.0.0/8&lt;/code&gt; allowed)&lt;/td&gt;
&lt;td&gt;Controls client netblocks (&lt;code&gt;allow&lt;/code&gt;, &lt;code&gt;refuse&lt;/code&gt;, &lt;code&gt;deny&lt;/code&gt;, &lt;code&gt;allow_snoop&lt;/code&gt;)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;root-hints:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;&amp;quot;&amp;quot;&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Uses built-in root hints for the &lt;code&gt;IN&lt;/code&gt; class when empty&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;harden-glue:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Trusts glue records only within the server&apos;s authority&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;harden-dnssec-stripped:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Treats trust-anchored zones as bogus if DNSSEC data is missing&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;harden-below-nxdomain:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;yes&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Uses a known DNSSEC-secure NXDOMAIN to return NXDOMAIN for names beneath it. NSEC3 with Opt-Out is insufficient.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;harden-referral-path:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;no&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Off by default; not an RFC standard and increases query load&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;edns-buffer-size:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;1232&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Advertised UDP EDNS reassembly buffer size in bytes&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;hide-identity:&lt;/code&gt;, &lt;code&gt;hide-version:&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;&lt;code&gt;no&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Set &lt;code&gt;yes&lt;/code&gt; to refuse &lt;code&gt;id.server&lt;/code&gt;, &lt;code&gt;hostname.bind&lt;/code&gt;, &lt;code&gt;version.server&lt;/code&gt;, and &lt;code&gt;version.bind&lt;/code&gt; queries&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;h2&gt;Resolve the systemd-resolved port 53 conflict and point clients to Unbound&lt;/h2&gt;
&lt;p&gt;Install &lt;code&gt;dig&lt;/code&gt; before running the queries below. It comes with BIND, as documented in the ISC &lt;a href=&quot;https://bind9.readthedocs.io/en/latest/dnssec-guide.html&quot;&gt;BIND 9 DNSSEC Guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Before changing the Ubuntu resolver, query the running Unbound instance directly. See NLnet Labs’s &lt;a href=&quot;https://unbound.docs.nlnetlabs.nl/en/latest/use-cases/home-resolver.html&quot;&gt;Resolver for Home Networks guide&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;dig example.com @127.0.0.1
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check for an answer and verify that the &lt;code&gt;SERVER:&lt;/code&gt; line shows &lt;code&gt;127.0.0.1#53&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;In this Ubuntu setup, &lt;code&gt;systemd-resolved&lt;/code&gt; listens at &lt;code&gt;127.0.0.53&lt;/code&gt; on port 53. To free the port for wildcard binding and route host queries to Unbound, edit &lt;code&gt;/etc/systemd/resolved.conf&lt;/code&gt; with administrator privileges. Set these options under &lt;code&gt;[Resolve]&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-ini&quot;&gt;[Resolve]
DNS=127.0.0.1
DNSSEC=yes
DNSStubListener=no
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Replace &lt;code&gt;/etc/resolv.conf&lt;/code&gt; with a link to the resolver file managed by &lt;code&gt;systemd-resolved&lt;/code&gt;, then restart that service.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo ln -fs /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl restart systemd-resolved
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Verify that the host’s default DNS resolver now answers through Unbound.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;dig example.com
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Check for an answer and verify that the &lt;code&gt;SERVER:&lt;/code&gt; line shows &lt;code&gt;127.0.0.1#53&lt;/code&gt;. If you’re serving the LAN, apply the sample configuration above to bind Unbound to &lt;code&gt;0.0.0.0&lt;/code&gt;, substituting your LAN subnet in &lt;code&gt;access-control:&lt;/code&gt;. For host-only use, keep the loopback listener. If the existing configuration already has the trust anchor and you made no changes to &lt;code&gt;unbound.conf&lt;/code&gt;, skip to DNSSEC verification.&lt;/p&gt;
&lt;h2&gt;Validate configuration and manage Unbound&lt;/h2&gt;
&lt;p&gt;Check your configuration file for syntax and other errors before starting or reloading the service.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;unbound-checkconf /etc/unbound/unbound.conf
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Per the &lt;a href=&quot;https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound-checkconf.html&quot;&gt;unbound-checkconf(8) manual&lt;/a&gt;, &lt;code&gt;unbound-checkconf&lt;/code&gt; exits with &lt;code&gt;0&lt;/code&gt; when the file is valid and &lt;code&gt;1&lt;/code&gt; on errors. Pass &lt;code&gt;-q&lt;/code&gt; to suppress success messages, &lt;code&gt;-o &amp;lt;option&amp;gt;&lt;/code&gt; to print the resolved value of one directive, or &lt;code&gt;-f&lt;/code&gt; with &lt;code&gt;-o&lt;/code&gt; to show full pathnames with &lt;code&gt;chroot&lt;/code&gt; applied.&lt;/p&gt;
&lt;p&gt;If the control connection uses TLS and needs credentials, generate the keys and self-signed certificates. These files are &lt;code&gt;unbound_server.key&lt;/code&gt;, &lt;code&gt;unbound_server.pem&lt;/code&gt;, &lt;code&gt;unbound_control.key&lt;/code&gt;, and &lt;code&gt;unbound_control.pem&lt;/code&gt;. A Unix control socket needs no certificate or key.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo -u unbound unbound-control-setup
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Use the configuration path you checked in each &lt;code&gt;unbound-control -c&lt;/code&gt; command below, including &lt;code&gt;flush_negative&lt;/code&gt;. Pass the path explicitly whenever it differs from the compiled default.&lt;/p&gt;
&lt;p&gt;After &lt;code&gt;unbound-checkconf&lt;/code&gt; succeeds, stop the running daemon. If remote control was already enabled, use &lt;code&gt;sudo unbound-control -c /etc/unbound/unbound.conf stop&lt;/code&gt;. If remote control was disabled and this is the host’s only Unbound instance, use &lt;code&gt;sudo pkill -f unbound&lt;/code&gt; as shown in the home resolver guide.&lt;/p&gt;
&lt;p&gt;Start Unbound with the checked configuration. A restart applies the listener changes. The &lt;a href=&quot;https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound-control.html&quot;&gt;unbound-control(8) manual&lt;/a&gt; documents that &lt;code&gt;start&lt;/code&gt; launches the daemon directly, so it works even if remote control was previously disabled.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo unbound-control -c /etc/unbound/unbound.conf start
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Once the daemon is running with remote control enabled, manage and inspect it with &lt;code&gt;unbound-control&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;sudo unbound-control -c /etc/unbound/unbound.conf status
sudo unbound-control -c /etc/unbound/unbound.conf stats_noreset
sudo unbound-control -c /etc/unbound/unbound.conf reload_keep_cache
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;unbound-control reload&lt;/code&gt; flushes the cache while rereading the configuration, whereas &lt;code&gt;reload_keep_cache&lt;/code&gt; attempts to preserve RRset and message caches if thread counts and cache sizes have not changed. &lt;code&gt;stats_noreset&lt;/code&gt; prints counters without zeroing them.&lt;/p&gt;
&lt;h2&gt;Verify recursive resolution and DNSSEC validation&lt;/h2&gt;
&lt;p&gt;If you’re setting up Unbound for your LAN, test from another device after the restart. Replace &lt;code&gt;192.168.0.2&lt;/code&gt; with your resolver’s LAN IP.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;dig example.com @192.168.0.2
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Confirm that the query returns an answer and that the &lt;code&gt;SERVER:&lt;/code&gt; line matches your Unbound host’s LAN IP. For LAN clients, wait until this check succeeds before configuring your router’s DHCP settings to advertise that IP as their DNS server.&lt;/p&gt;
&lt;p&gt;For a separate validation check, use &lt;code&gt;unbound-host -D&lt;/code&gt; to enable DNSSEC validation. It reads the root anchor from the program’s default anchor path, which must contain the anchor for this check. Add &lt;code&gt;-v&lt;/code&gt; to print validation results and look for &lt;code&gt;secure&lt;/code&gt; on the signed name &lt;code&gt;ftp.isc.org.&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;unbound-host -D -v ftp.isc.org.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;As described in the &lt;a href=&quot;https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound-host.html&quot;&gt;unbound-host(1) manual&lt;/a&gt;, &lt;code&gt;unbound-host -v&lt;/code&gt; labels each answer as &lt;code&gt;secure&lt;/code&gt; (validated successfully with a key), &lt;code&gt;insecure&lt;/code&gt; (no security configured for the name), or &lt;code&gt;bogus&lt;/code&gt; (validation failed). Do not pass &lt;code&gt;-r&lt;/code&gt; during this check, because &lt;code&gt;-r&lt;/code&gt; reads forwarders from &lt;code&gt;/etc/resolv.conf&lt;/code&gt; and can break DNSSEC validation if those forwarders do not pass DNSSEC data.&lt;/p&gt;
&lt;p&gt;Next, verify DNSSEC through the running daemon using &lt;code&gt;dig&lt;/code&gt; with &lt;code&gt;+dnssec&lt;/code&gt; against a signed domain.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;dig @127.0.0.1 ftp.isc.org. A +dnssec
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Look for &lt;code&gt;status: NOERROR&lt;/code&gt;, the &lt;code&gt;ad&lt;/code&gt; (Authenticated Data) flag in the response header, and accompanying &lt;code&gt;RRSIG&lt;/code&gt; records.&lt;/p&gt;
&lt;p&gt;When a domain returns &lt;code&gt;SERVFAIL&lt;/code&gt;, run the two queries below with the failing domain in place of &lt;code&gt;example.com&lt;/code&gt;. See the ISC &lt;a href=&quot;https://bind9.readthedocs.io/en/latest/dnssec-guide.html&quot;&gt;BIND 9 DNSSEC Guide&lt;/a&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code class=&quot;language-bash&quot;&gt;dig @127.0.0.1 example.com A
dig @127.0.0.1 example.com A +cd
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;With the configuration shown, the &lt;code&gt;+cd&lt;/code&gt; (Checking Disabled) flag asks Unbound to skip validation for that query. Unbound ignores the flag if &lt;code&gt;ignore-cd-flag: yes&lt;/code&gt; is set. If the normal query returns &lt;code&gt;SERVFAIL&lt;/code&gt; while the &lt;code&gt;+cd&lt;/code&gt; query succeeds, the failure is a DNSSEC validation error.&lt;/p&gt;
&lt;h2&gt;Troubleshoot DNSSEC validation failures&lt;/h2&gt;
&lt;p&gt;With the configuration shown, use these checks when a query returns &lt;code&gt;SERVFAIL&lt;/code&gt; and succeeds with &lt;code&gt;dig +cd&lt;/code&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Re-check trust anchor permissions.&lt;/strong&gt; Confirm the &lt;code&gt;unbound&lt;/code&gt; user can write to &lt;code&gt;root.key&lt;/code&gt; and its parent directory, and re-run the &lt;code&gt;unbound-anchor&lt;/code&gt; command above with the configured anchor path if the file is missing or outdated.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Flush cached failures.&lt;/strong&gt; With remote control enabled, run &lt;code&gt;sudo unbound-control -c /etc/unbound/unbound.conf flush_negative&lt;/code&gt; after fixing a configuration or upstream issue. This clears negative cache entries, including &lt;code&gt;SERVFAIL&lt;/code&gt; responses and bad DNSSEC key entries.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Consider the following alternatives only after confirming a validation problem and ruling out an attack. Restart the server to read changes to &lt;code&gt;unbound.conf&lt;/code&gt;. See NLnet Labs’s &lt;a href=&quot;https://nlnetlabs.nl/documentation/unbound/howto-turnoff-dnssec/&quot;&gt;Howto Turn Off DNSSEC&lt;/a&gt;.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Affected domain only.&lt;/strong&gt; Temporarily bypass a broken chain of trust with &lt;code&gt;domain-insecure: &amp;quot;example&amp;quot;&lt;/code&gt;, replacing &lt;code&gt;example&lt;/code&gt; with the affected domain. Per the &lt;a href=&quot;https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html&quot;&gt;unbound.conf(5) manual&lt;/a&gt;, Unbound then ignores the DNSSEC chain of trust towards that domain, so a trust anchor above it cannot make it secure. If you set a trust anchor for the domain itself, that anchor overrides &lt;code&gt;domain-insecure:&lt;/code&gt; and the domain is secured.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resolver-wide permissive mode.&lt;/strong&gt; Keep validation checks enabled while allowing bogus replies with &lt;code&gt;val-permissive-mode: yes&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Resolver-wide validation off.&lt;/strong&gt; Turn off the validator module completely with &lt;code&gt;module-config: &amp;quot;iterator&amp;quot;&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;Security warning.&lt;/strong&gt; Permissive mode returns bogus answers to clients and can slow resolution. Setting &lt;code&gt;module-config: &amp;quot;iterator&amp;quot;&lt;/code&gt; disables validation. Revert to strict validation as soon as troubleshooting is complete.&lt;/p&gt;
&lt;p&gt;Browse the &lt;a href=&quot;/posts/&quot;&gt;Homelab DNS Guide posts index&lt;/a&gt;.&lt;/p&gt;
</content:encoded><category>unbound</category><category>dnssec</category><category>recursive-dns</category><category>homelab-dns</category><category>linux</category><author>Homelab DNS Guide Editorial</author></item></channel></rss>