DHCP Server configuration trought cli

Started by techax, July 24, 2021, 12:50:19 PM

Previous topic - Next topic
July 24, 2021, 12:50:19 PM Last Edit: July 24, 2021, 12:52:39 PM by techax
Hi.
Im looking for solution to disable/enable dhcp server for specific interface trought Monit plugin.

I want to disable dhcp server if there is another one already running on that network. Or basically if device with specific ip (excepted dhcp server) responds to ping. but once its offline, i want opnsense to start dhcp server on that interface.

I thought about using OPNsense API, but i didnt found DHCP module in API documentation.

It would be easy as enable/disable dhcpd service if i need it for one interface. but i want to use that for 4 interfaces independently, and dhcp server seems running as one common service for all interfaces.

Thanx and have a nice day.