Hi!
OPNsense v25.1.7 host aliases no longer working:
>host omv.localdomain
Host omv.localdomain not found: 2(SERVFAIL)
>host openmediavault.localdomain
openmediavault.localdomain has address XXX.XXX.XXX.XXX
cfg was not changed since 25.1.6_4
I was just going to post the same. A rollback to 25.1.6_4 gives the aliases again.
As it seems, /var/etc/dnsmasq-hosts is not filled any more, all the aliases are being ignored.
I just created an issue on Github (https://github.com/opnsense/core/issues/8694), because that breaks the upgrade for me.
Writing dhcp-hosts into that file broke things like constructed ipv6 leases.
https://github.com/opnsense/core/pull/8653
Only entries that do not have a mac address or a client_id will be added there, as they are the original target of that file, host overrides.
dhcp-host hostnames get added automatically without having to specify them in this file.
Nope, I tried it. All of my aliases with static reservations are gone. They are neither in /usr/local/etc/dnsmasq.conf nor in /var/etc/dnsmasq-hosts.
As Franco wrote in the issue: entries are now only written when a DHCP lease is being handed out. For some of my hosts, I have the MAC -> IP -> names + aliases entry, but I never use them for DHCP, as they are really statically configured, like a webserver with a "www.internal" alias. The way it "works" now effectively removes it from DNS.
does patch e69b02c solve the alias not working on static DHCP entries?
There is already a hotfix out, just search for updates and it should be fixed. :)
(Though you probably have to manually press apply one time in dnsmasq afterwards)
the issue is fixed in OPNsense 25.1.7_2, /var/etc/dnsmasq-hosts is populated correctly
Though it works for some time, the latter resolution is again faulty. Restarting Unbound fixes the problem for a short time.
You can try if this fixes it for you:
https://forum.opnsense.org/index.php?topic=47278.msg238093#msg238093