You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reproducible in v25.1. Unknown if this was ever not an issue.
The OPNsense Web UI allows addition of an ISC DHCPv4 static mapping with a domain name starting with a dot ("."). The resulting Unbound DNS config (assuming "Register DHCP Static Mappings" is enabled) looks like:
local-data-ptr: "192.168.1.254 fakehostname..fakedomain"
local-data: "fakehostname..fakedomain IN A 192.168.1.254"
which results in Unbound failing to start:
<27>1 2025-01-30T16:00:08+00:00 opntest1.localdomain unbound 8416 - [meta sequenceId="24"] [8416:0] error: error parsing local-data at 15 'fakehostname..fakedomain IN A 192.168.1.254': Empty label
<27>1 2025-01-30T16:00:08+00:00 opntest1.localdomain unbound 8416 - [meta sequenceId="25"] [8416:0] error: Bad local-data RR fakehostname..fakedomain IN A 192.168.1.254
<26>1 2025-01-30T16:00:08+00:00 opntest1.localdomain unbound 8416 - [meta sequenceId="26"] [8416:0] fatal error: Could not set up local zones
To Reproduce
Steps to reproduce the behavior:
Enable "Register DHCP Static Mappings" for Unbound DNS
Create an ISC DHCPv4 static mapping (for any DHCP-enabled interface) with a fake MAC address (e.g. "aa:bb:cc:dd:ee:ff"), hostname "fakehostname" and domain ".fakedomain"
(try to) restart the Unbound DNS service (it will fail)
Observe error in resolver log
Note: It appears that neither ISC DHCPv6 static mappings nor Kea reservations allow specification of a domain name, so this issue seems to pertain to ISC DHCPv4 only.
Expected behavior
Perhaps OPNsense should strip any leading dots from domain names when combining them with hostnames to produce DNS records, which would allow Unbound to start.
If that's not feasible, the UI should refuse to create a static mapping where the domain starts with a dot.
The text was updated successfully, but these errors were encountered:
Thank you for creating an issue.
Since the ticket doesn't seem to be using one of our templates, we're marking this issue as low priority until further notice.
See also: https://forum.opnsense.org/index.php?topic=45457.0
Reproducible in v25.1. Unknown if this was ever not an issue.
The OPNsense Web UI allows addition of an ISC DHCPv4 static mapping with a domain name starting with a dot ("."). The resulting Unbound DNS config (assuming "Register DHCP Static Mappings" is enabled) looks like:
which results in Unbound failing to start:
To Reproduce
Steps to reproduce the behavior:
Note: It appears that neither ISC DHCPv6 static mappings nor Kea reservations allow specification of a domain name, so this issue seems to pertain to ISC DHCPv4 only.
Expected behavior
Perhaps OPNsense should strip any leading dots from domain names when combining them with hostnames to produce DNS records, which would allow Unbound to start.
If that's not feasible, the UI should refuse to create a static mapping where the domain starts with a dot.
The text was updated successfully, but these errors were encountered: