OPNsense Forum

English Forums => Virtual private networks => Topic started by: bucky2780 on June 07, 2021, 04:20:50 AM

Title: wireguard assignment with wg0 (resolved)
Post by: bucky2780 on June 07, 2021, 04:20:50 AM
I am working through the road warrior setup of wireguard in the opnsense docs.

when it comes to assignment/routing I have a showstopper that mystifies me.

I assign wg0 as an interface. But when I try to enable it I get the following error....

>>
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.
>>
However ipv4 config type is defined as (none)... so that can't be the problem.

really confusing... so any ideas are appreciated.

Title: Re: wireguard assignment with wg0
Post by: bucky2780 on June 07, 2021, 04:26:01 AM
I deleted the existing wg0 assignment, and re-added it. I was able to save it while enabling it without getting the dhcp error. Looks like the uI was holding on to something....
Title: Re: wireguard assignment with wg0 (resolved)
Post by: pawalan on August 29, 2026, 03:35:19 PM
I encountered the same issue but deleting/re-adding the wgX assignment didn't solve it for me.

In my case, it turned out there was a
<dhcpd>...</dhcpd> section in the
/conf/config.xml file that contained a legacy ISC-DHCPD configuration from waaaay back when I used that - despite having migrated to Kea DHCP already ages ago. It seems OPNsense does not delete configuration for services/tools that are being disabled/uninstalled - maybe that's for a restore scenario where you re-install/re-enable that service... who knows.

Root cause for the error message:

Back in the days when I used ISC-DHCPD, one of my networks was configured on the
opt4 identifier, which later got freed up by a network redesign and then got re-used when I set up Wireguard.

It appears that when attempting to enable the new Wireguard interface, OPNsense still evaluated the old ISC-DHCPD configuration for the
opt4 identifier - which (obviously) had DHCP enabled and therefore threw the error:

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.

The solution was to SSH into the OPNsense box, manually edit
/conf/config.xml and remove the
<opt4>...</opt4> section that was nested inside the
<dhcpd>...</dhcpd> section of the XML code.

With this fix in place, I was able to enable the Wireguard interface.
Title: Re: wireguard assignment with wg0 (resolved)
Post by: Lucid1010 on August 31, 2026, 09:59:47 AM
This looks like a bug.