OPNsense Forum

English Forums => General Discussion => Topic started by: talmage on July 16, 2024, 07:35:22 PM

Title: Adding DHCP hosts from the CLI
Post by: talmage on July 16, 2024, 07:35:22 PM
What's the way to add another host to isc-dhcp using the CLI?

My guess is that I can add a <staticmap> stanza for the new host to the <lan> section of <dhcp> in /conf/config.xml .

How do I tell Opnsense to re-read /conf/config.xml and reconfigure dhcpd?

Is this the right way?  Is there a better way via the CLI?
Title: Re: Adding DHCP hosts from the CLI
Post by: talmage on July 16, 2024, 11:45:58 PM
Stipulating that editing /conf/config.xml is the right thing to do, https://www.reddit.com/r/opnsense/comments/16g5z62/how_to_update_config_via_cli/ (https://www.reddit.com/r/opnsense/comments/16g5z62/how_to_update_config_via_cli/) says that

configctl dhcpd restart

will tell dhcp about my changes.