OPNsense Forum

English Forums => 25.7 Series => Topic started by: OPNenthu on August 03, 2025, 02:53:04 AM

Title: [Solved] Installer bug - DHCP custom range not persisted in Dnsmasq
Post by: OPNenthu on August 03, 2025, 02:53:04 AM
Using the 25.7 installer on a test VM, I used console option 2 to set the LAN interface IP and a custom DHCP range of 192.168.160.100 - 192.168.160.199.  I then launched the installer and installed to disk.  This was a fresh install over an existing one (ZFS pool overwrite, no config import).

After logging in to the GUI and completing the initial setup wizard, Dnsmasq was enabled but the DHCP range was set to 192.168.160.41 - 192.168.160.245.

(No argument from me that .41-.245 is not a better default since in Dnsmasq the static reservations should be within the pool range, unlike in ISC.)

Just reporting it for consideration in the 26.1 installers :)  Maybe someone else can also verify if they saw this since I was kind of in a hurry.
Title: Re: Installer bug - DHCP custom range not persisted in Dnsmasq
Post by: franco on August 04, 2025, 12:44:10 PM
Thanks for noticing. The new wizard works a bit different than the old one: it doesn't know a lot about the running system. The old wizard used the defaults already in the system, but the new wizard has a static memory model with its own defaults. That's why the range for Dnsmasq was reset.

https://github.com/opnsense/core/blob/master/src/opnsense/mvc/app/models/OPNsense/Core/InitialSetup.php#L333-L338

There are other complications because of this that we want to work on bit by bit, e.g.

https://github.com/opnsense/core/issues/8976
https://github.com/opnsense/core/issues/8969
https://github.com/opnsense/core/issues/8967


Cheers,
Franco
Title: Re: Installer bug - DHCP custom range not persisted in Dnsmasq
Post by: OPNenthu on August 04, 2025, 05:09:30 PM
Thanks for the background.  Marking this solved since the functional area is still evolving.

For anyone wondering, console option 2 did still work on an already installed system and updated the range in Dnsmasq.
Title: Re: [Solved] Installer bug - DHCP custom range not persisted in Dnsmasq
Post by: demyers on August 04, 2025, 09:03:50 PM
Quote from: OPNenthu on August 04, 2025, 05:09:30 PMFor anyone wondering, console option 2 did still work on an already installed system and updated the range in Dnsmasq.
I ran Option 2 twice (to change the LAN addresses as a test and then change them back) and both of my Dnsmasq ranges were deleted.
Title: Re: [Solved] Installer bug - DHCP custom range not persisted in Dnsmasq
Post by: OPNenthu on August 04, 2025, 09:52:33 PM
I only tried with a single interface/range (the default LAN).

Did you by chance accidentally skip past or accept the default on the question "Do you want to enable the DHCP server on LAN? [y/N]"   Since no is the default I would expect it to disable the range.