"The DHCP Server is active on this interface"

Started by clarknova, June 03, 2026, 10:34:32 PM

Previous topic - Next topic
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.

Another option would be to configure the modem with a static IP address before it is connected to the WAN port.

With the right configuration in OPNsense, you can access the modem even when the WAN interface cannot obtain an IP address via DHCP from your ISP.

Sins of the past. These validations have been suboptimal for a number of reasons and bugs.

You can drop ISC DHCPv4 and v6 legacy configuration from System: Configuration: Defaults: Components if you no longer use the ISC DHCP plugin.

Safeguarding every check in the GUI with plugin presence is not something we're going to do -- the code itself is pluggable but the taint is from other components that should not have been tied to it in the first place.


Cheers,
Franco
"AI has absolutely reduced the cost of creating technical debt." -- ChatGPT