OPNsense Forum

English Forums => 25.1, 25.4 Production Series => Topic started by: ryp43 on May 19, 2025, 03:14:50 PM

Title: 25.1.7-Dnsmasq-Hosts-Aliases not working.
Post by: ryp43 on May 19, 2025, 03:14:50 PM
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



Title: Re: 25.1.7-Dnsmasq-Hosts-Aliases not working.
Post by: meyergru on May 19, 2025, 03:19:55 PM
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.
Title: Re: 25.1.7-Dnsmasq-Hosts-Aliases not working.
Post by: Monviech (Cedrik) on May 19, 2025, 03:23:13 PM
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.
Title: Re: 25.1.7-Dnsmasq-Hosts-Aliases not working.
Post by: meyergru on May 19, 2025, 03:27:02 PM
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.
Title: Re: 25.1.7-Dnsmasq-Hosts-Aliases not working.
Post by: agh1701 on May 20, 2025, 03:01:41 PM
does patch e69b02c solve the alias not working on static DHCP entries?
Title: Re: 25.1.7-Dnsmasq-Hosts-Aliases not working.
Post by: Monviech (Cedrik) on May 20, 2025, 03:16:05 PM
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)
Title: Re: 25.1.7-Dnsmasq-Hosts-Aliases not working.
Post by: ryp43 on May 21, 2025, 03:22:42 PM
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.
Title: Re: 25.1.7-Dnsmasq-Hosts-Aliases not working.
Post by: Monviech (Cedrik) on May 21, 2025, 05:13:08 PM
You can try if this fixes it for you:

https://forum.opnsense.org/index.php?topic=47278.msg238093#msg238093