OPNsense Forum

English Forums => General Discussion => Topic started by: kernelhappy on April 18, 2026, 08:41:11 PM

Title: Unbound fails after reboot from trailing-dot in host override (maybe easy fix?)
Post by: kernelhappy on April 18, 2026, 08:41:11 PM
I hit this yesterday, I'm new to opnsense so it cost me about an hour of network downtime while debugging, I'm posting it here in case someone else gets stuck. 

I filed a GitHub bug report with data and logs here https://github.com/opnsense/core/issues/10170

I'm guessing it's probably a small, contained change if someone is looking for a quick kill, but I do not know the codebase.

TL;DR: A host override with a trailing dot in the Host field (e.g. "myhost.") plus domain "lan" ends up as "myhost..lan" in unbound.conf. Unbound refuses to start — "Empty label" / "Could not set up local zones".   It's easy to trigger via the "+" shortcut next to a DHCP lease and it appears some clients report hostnames with a trailing dot (valid FQDN notation). OPNsense saves it as-is.

The nasty part is it doesn't fail at save time, but it does fail on the next reboot. So an unattended/unintended reboot will leave you (or everyone else on the network if you're not present) without DNS.

Workaround for anyone stuck right now:

It looks like this may be related to #3944 (whitespace), #5550 (special chars), and #5804 (DHCP/override conflicts) — all seem to involve hostname sanitization.