Unbind your DNS

In an era where data privacy is paramount, controlling your own DNS resolution is one of the most impactful steps a homelabber can take. Here is how I achieved a fully recursive, ad-blocking setup.

Prerequisites

Unraid server, Docker knowledge, basic networking understanding

My setup

As you may know from reading my other post I run Unraid, this software is the backbone of my homelab. So for me it only made sense to run my own DNS locally. I have run multiple Docker and LXC containers, and found that they have all missed something, or was not maintained well enough. As a result decided to run seperate Docker containers for each service.

I setup the Official Unbound container and the Official Adguard Home container all under their own ip address using the br0 network mode. Using br0 gives them dedicated IPs, making firewall rules and monitoring easier

Then i pointed the Adguard Home instance to the Unbound as the upstream resolution. At this point i would recommend using a second machine, even a rasberry Pi, to do the same as a fallback, as if your main server fails or goes offline, your whole network stays up.

The Filtering Layer: AdGuard Home

You may have heard of Pi-Hole, a network wide ad blocker, well Adguard Home is a great alternative offering the same or in some cases similar features.

The best feature which Pi-Hole has not got, is a built in blocklist menu. Simply select which ones suit you from the add blocklist button.

Image

The Recursive Engine: Unbound

Unlike many DNS servers you may run locally, Unbound is a full recursive Solution, meaning it will talk directly to the root servers rather than to another upstream DNS server. There is no GUI (Graphical User Interface) to manage which with the help of a well-known chatbot, i was able to get the configuration working well. I believe my config will help you well. I have disabled the forwarding and local zone records (A records), at the bottom of the file by commenting them out, because i don’t use them.

unbound.confConf

The way this works is is Your computer (the client), sends the request to Adguard Home for filtering and then sent to Unboud. Unbound then speaks to the DNS server for the IP address so your computer knows where to go.
Here is a diagram below.

DNS Process

To test if unbound is running the DNSSEC properly run this command, replacing the <UNBOUND_IP> with the ip address of your unbound server (eg. 192.168.0.2).

Bash / Shell
dig @<UNBOUND_IP> dnssec-failed.org +dnssec

Then run the command below to confirm that it is resolving a proper DNSSEC

Bash / Shell
dig @<UNBOUND_IP> cloudflare.com +dnssec

Why This Architecture Works

I love the idea that it is private and not sent to a 3rd party, and for a local environment it is responsive and easy to manage and update. I especially like that Unbound has a local cache in-memory to make the return to any site you visit a bit faster. AdGuard Home may not be as rich in features as Pi-Hole but it is a good trade-off to have the most popular blocklists built in and constantly updated. As mentions before, using them as separate official containers i am reassured to know that the will be kept updated to the latest version, providing any security updates and features that may come in the future.

Related Posts

OpenCloud logo featuring a hexagonal icon and purple wordmark on a dark teal background
Guides

Personal Cloud In Go

Discover Opencloud, a lightweight self-hosted cloud platform written in Go. Learn about its powerful file sharing, versioning, and web office features, plus installation instructions for Unraid and performance comparisons with alternatives.

Read More »
Screenshot from the Web Panel Made Easy tutorial demonstrating server management interface setup
Personal Journey

Web Panel Made Easy.

CloudPanel is a free, lightweight web hosting control panel that makes managing your self-hosted web stack surprisingly straightforward. From an intuitive dashboard to one-click site creation, SSL, caching, and backups — here is how it holds up in a real homelab environment.

Read More »
Yoast SEO settings panel configured for the Unraid virtualisation tutorial post
Reviews

Unraid Virtualisation in a box

Unraid is a Linux-based NAS and home server OS that boots from a USB stick and runs on almost any hardware. From network storage and virtual machines to Docker containers and LXC — here is why it might be the best starting point for your homelab.

Read More »