OPNsense Forum

English Forums => General Discussion => Topic started by: FrenchFries on August 16, 2017, 02:43:25 pm

Title: How to modify configuration files by hand
Post by: FrenchFries on August 16, 2017, 02:43:25 pm
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,
Title: Re: How to modify configuration files by hand
Post by: franco on August 16, 2017, 03:00:05 pm
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
Title: Re: How to modify configuration files by hand
Post by: clustev on August 20, 2020, 10:40:47 am
Where is dhcp config now in OPNsense 20.7.1-amd64?
Title: Re: How to modify configuration files by hand
Post by: franco on August 20, 2020, 11:21:26 am
Where it always has been. See original question above.


Cheers,
Franco
Title: Re: How to modify configuration files by hand
Post by: Patrick M. Hausen on August 20, 2020, 11:25:27 am
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.
Title: Re: How to modify configuration files by hand
Post by: franco on August 20, 2020, 11:26:27 am
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
Title: Re: How to modify configuration files by hand
Post by: clustev on August 20, 2020, 02:36:12 pm
Franco, thx a lot, now it works!  ;D ;D ;D