26.1.9
I had to enable the Dnsmasq DHCP on my WAN interface temporarily to access a modem that was connected there. Once done, I disabled Dnsmasq and removed all options and scopes. Then I tried to change the WAN's IPv4 configuration from static to DHCP and got the red notice:
The following input errors were detected:
The DHCP Server is active on this interface and it can be used only with a static IP configuration. Please disable the DHCP Server service on this interface first, then change the interface configuration.
I confirmed that Dnsmasq and Kea are disabled. ISC plugin is not installed. The Services widget on the dashboard doesn't list any DHCP server. I even rebooted, but the error persists.
How do I get rid of this error message so I can enable the DHCP client on the WAN interace?
I downloaded the config file and found this:
<dhcpd>
<lan>
<range>
<from>192.168.97.10</from>
<to>192.168.97.245</to>
</range>
</lan>
</wan>
<enable>1</enable>
<ddnsdomainalgorithm>hmac-md5</ddnsdomainalgorithm>
<numberoptions>
<item/>
</numberoptions>
<range>
<from>192.168.2.100</from>
<to>192.168.2.110</to>
</range>
<winsserver/>
<dnsserver/>
<ntpserver/>
</wan>
</dhcpd>
I changed the 1 to a 0 and uploaded the config, but I'm still seeing the error. I believe this is a remnant from when I was running ISC DHCP server in 24.7.x. I used 'opnsense-bootstrap -r 26.1' to get up to date, but I guess this part of the config was left behind. I'm not sure how to remove it properly.
Ok, I installed the ISC-DHCP plugin, disabled it on WAN, then was able to set my WAN IPv4 to DHCP. Looking at the updated config file, it looks like I just needed to remove the '<enable>1</enable>' line altogether.
Can I make a feature request here? It would be great if OPNsense would remove this line when the ISC-DHCP plugin is not installed, or ignore it when configuring the WAN interface.