How to modify configuration files by hand

Started by FrenchFries, August 16, 2017, 02:43:25 PM

Previous topic - Next topic
August 16, 2017, 02:43:25 PM Last Edit: August 16, 2017, 02:45:58 PM by FrenchFries
Dear friends,

I am trying to migrate list the list of dhcpd hosts from one firewall to another (to migrate dhcpd).

As root, I tried to modify /var/dhcpd/etc/dhcpd.conf
by hand as it is faster.

It does not work, on every startup of OPNsense, the old configuration is retained.

So is it possible to copy files by hand in OPNsense?
Is all configuration retained in OPNsense referencial and not FreeBSD?

Kind regards,

Hi,

This is done on purpose to avoid uncontrollable syntax errors, reboot-persistency and config.xml portability.

Most files are written from the backend, the files are under /usr/local/etc/inc, DHCP configurations are written from services.inc.


Cheers,
Franco

Where is dhcp config now in OPNsense 20.7.1-amd64?

Where it always has been. See original question above.


Cheers,
Franco

August 20, 2020, 11:25:27 AM #4 Last Edit: August 20, 2020, 11:40:10 AM by pmhausen
You can download a complete configuration, add your entries in the XML with a suitably comfortable editor, then re-upload the config.

That's what I did when I wanted to remove some credentials that the UI would not let me delete.
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

Judging from the other thread the answer is probably this:

/usr/local/etc/inc/plugins.inc.d/dhcpd.inc

PS: https://forum.opnsense.org/index.php?topic=17286.0

Franco, thx a lot, now it works!  ;D ;D ;D