OPNsense Forum

English Forums => General Discussion => Topic started by: _c_v_ on May 30, 2023, 03:38:26 am

Title: [SOLVED] Configuring OPNsense to Respond to DHCP Requests from ISC-DHCP-Relay
Post by: _c_v_ on May 30, 2023, 03:38:26 am
Hello everyone,

I have a specific configuration question regarding OPNsense and I'm hoping someone here can assist me. In my network setup, I have a separate device that is connected to the OPNsense via VPN. This device is running an ISC-DHCP-Relay.

The relay is successfully forwarding requests over the VPN to the OPNsense. However, I am having trouble getting OPNsense to respond to these DHCP requests from the ISC-DHCP-Relay device. Could anyone advise me on how to configure the integrated DHCP in OPNsense to accomplish this?

Thank you in advance for any help or suggestions you can provide.

Title: Re: Configuring OPNsense to Respond to DHCP Requests from ISC-DHCP-Relay
Post by: meyergru on May 30, 2023, 01:37:18 pm
For ISC DHCPD, you must choose between a server that listens to broadcasts and one that can server routed requests over UDP port 67 (see https://linux.die.net/man/5/dhcpd.conf):

Quote
The local-address statement
local-address address;

This statement causes the DHCP server to listen for DHCP requests sent to the specified address, rather than requests sent to all addresses. Since serving directly attached DHCP clients implies that the server must respond to requests sent to the all-ones IP address, this option cannot be used if clients are on directly attached networks...it is only realistically useful for a server whose only clients are reached via unicasts, such as via DHCP relay agents.

Such servers are generally deployed in enterprise contexts only.
Title: Re: Configuring OPNsense to Respond to DHCP Requests from ISC-DHCP-Relay
Post by: _c_v_ on May 30, 2023, 08:14:45 pm
Thanks for the information. Does that mean OPNsense cannot be used as a central DHCP server in order to be able to supply DHCP relays via routed unicast?
Title: Re: Configuring OPNsense to Respond to DHCP Requests from ISC-DHCP-Relay
Post by: meyergru on May 30, 2023, 10:41:21 pm
It could, but you would have to modify the configuration by hand because the scripts do not set the appropriate parameter and the GUI does is not design to allow it, either. Also, you would lose the ability to give out leases on the local interfaces.
Title: Re: Configuring OPNsense to Respond to DHCP Requests from ISC-DHCP-Relay
Post by: _c_v_ on May 31, 2023, 03:12:35 pm
Okay, thanks for the clarification and help.