cd ../articles

Networking System Homelab

Self-hosting a private DNS with Technitium on Proxmox

Network-wide ad blocking, local names for every service and a live view of every query, in a 512 MB container. Plus the DHCP trick that got around an ISP box that will not change its DNS.

  • Technitium
  • DNS
  • DHCP
  • .NET

My homelab needed a DNS layer of its own: block ads for every device, answer for internal names like jellyfin.home.lan, and show me what everything on the network is asking for. Technitium does all three in a 512 MB container. The hard part turned out to be the ISP box.

Why Technitium

Pi-hole, AdGuard Home, Unbound and dnsmasq all came up. Technitium fits a homelab well because it does several jobs in one process: a full recursive and authoritative server, local zones, blocklists with live logs of what got blocked, DNSSEC, DNS-over-HTTPS, and a built-in DHCP server. That last feature mattered more than I expected, because it is how I got a custom DNS onto every client without touching the ISP box.

Architecture

technitium.svg
Technitium: DNS and DHCP for the house
Technitium: DNS and DHCP for the house
Text version
Home devices   192.168.2.x
   │  DNS on UDP/TCP 53
   ▼
Proxmox host   vmbr0 192.168.2.100
   │  DNAT :53 → 192.168.1.11
   ▼
gamma · Technitium LXC   192.168.1.11
   ├── answers *.home.lan from a local zone
   ├── forwards everything else to 1.1.1.1, filtered by blocklists
   └── serves DHCP for the LAN

The container

One core, 512 MB of RAM, 8 GB of disk, unprivileged, static address on vmbr1, internet through the host's NAT. I pass --nameserver 1.1.1.1 to pct create so apt can resolve packages before Technitium exists. Classic chicken and egg.

The .NET runtime

Technitium needs the ASP.NET Core runtime. Debian 13 does not ship it and Microsoft's repository had no Trixie channel yet, so the official install script is the cleanest path:

curl -sSL https://dot.net/v1/dotnet-install.sh -o dotnet-install.sh
chmod +x dotnet-install.sh
./dotnet-install.sh --channel 10.0 --runtime aspnetcore --install-dir /usr/share/dotnet
ln -s /usr/share/dotnet/dotnet /usr/bin/dotnet

Installing Technitium as a service

curl -sSL https://download.technitium.com/dns/DnsServerPortable.tar.gz -o /tmp/dns.tar.gz
mkdir -p /opt/technitium/dns
tar -xzf /tmp/dns.tar.gz -C /opt/technitium/dns
dotnet /opt/technitium/dns/DnsServerApp.dll   # first run: set the admin password on :5380, then Ctrl+C
/etc/systemd/system/technitium.service
[Unit]
Description=Technitium DNS Server
After=network.target

[Service]
Type=simple
ExecStart=/usr/share/dotnet/dotnet /opt/technitium/dns/DnsServerApp.dll
WorkingDirectory=/opt/technitium/dns
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
systemctl enable --now technitium
ss -ulnp | grep :53      # DNS
ss -tlnp | grep :5380    # web UI

Blocklists that do not break the internet

My first list was aggressive enough to kill Twitter, Reddit and a few sites I actually use, by answering NXDOMAIN as if they did not exist. A blocked domain and a nonexistent one look the same to a browser: "site can't be reached", no hint that DNS is filtering. The Logs tab is the fastest way to tell them apart.

A sane starting point:

  • OISD small, https://small.oisd.nl/dnsmasq, curated against false positives.
  • HaGeZi Multi NORMAL, a well-balanced complement.

I avoid anything named "social", "extreme" or "ultimate" unless I know exactly what it removes. When a legitimate site stops resolving, the log entry is one click away from the Allowed list.

Forwarders and local zones

In Settings → Forwarders, Cloudflare's 1.1.1.1 handles everything outside my zones. In Zones, an authoritative home.lan zone holds the infrastructure hosts:

alpha.home.lan   →  192.168.1.1     Proxmox host
gamma.home.lan   →  192.168.1.11    Technitium
delta.home.lan   →  192.168.1.12    Nginx Proxy Manager
*.home.lan       →  reverse proxy, which routes on the Host header

I do not add a record per application. Names like jellyfin.home.lan land on the reverse proxy and the proxy decides which backend to hit.

HTTPS for the admin UI

To reach the UI at https://gamma.home.lan, I added a proxy host in NPM. The forward scheme must be http: Technitium serves plain HTTP on 5380, so pointing NPM at https:// gives a 502 while the backend is perfectly healthy.

Getting the whole LAN to use it

My ISP box will not hand out anything but its own DNS over DHCP, so there was no field to change. Three options:

OptionVerdict
Set DNS by hand on every deviceWorks, forgets every new device, chore forever
Intercept port 53 transparently on ProxmoxOnly works if Proxmox is the gateway; mine is not
Disable the box's DHCP, let Technitium serve itChosen: Technitium pushes itself as resolver

One snag: the Orange TV decoder only works with a lease from the ISP box. So the decoder gets a static lease on the box, the box's pool is shrunk to that single address, and Technitium serves DHCP to everything else. Every new device gets ad blocking and internal names automatically, and the TV still works.

Pitfalls worth knowing

NXDOMAIN is silent

Blocked and nonexistent look identical. If a site suddenly breaks, the Logs tab knows why.

Type=notify quietly breaks the service

systemctl status looks green-ish while the unit loops on restart. Type=simple stops the loop.

Wrong scheme on the reverse proxy

HTTPS to a plain-HTTP backend gives a 502. The certificate on NPM has nothing to do with the backend scheme.

A strict blocklist can pose as a network outage

I first thought the container had lost internet. Comparing dig example.com with a suspected blocked name sorts it out in seconds.

Result

Weeks later it has been solid. Ads and trackers are gone on every device with nothing installed on them, internal services have clean names over HTTPS, and new devices pick up the right DNS on their own. The query log also surfaced a chatty IoT device I did not know about.

The real lesson was not technical. In a homelab, most bugs are small misconfigurations that look like something bigger: a systemd type, a proxy scheme, an over-eager list. Reading logs beats guessing every time.