OPNsense Forum

English Forums => Tutorials and FAQs => Topic started by: Aloist on November 20, 2018, 05:13:24 pm

Title: can I save Opensense configuration to text file, edit and reload it?
Post by: Aloist on November 20, 2018, 05:13:24 pm
I am new to Opensense and am considering to set it up as Firewall using one of our spare servers.

I am familiar with iptables on Linux, and with filter rules as access lists in Cisco routers.

Up to now we used access list in Cisco routers as firewall.
There, I can save the configuration into a text file, or edit the configuration file off-line, and then
upload it to the router.

I am used to maintain firewall roules that way, and prefer that to a graphical interface.
Is this possible with Opensense, i.e. maintain configuration off-line and upload it, to replace the
existing configuration?
Title: Re: can I save Opensense configuration to text file, edit and reload it?
Post by: franco on November 20, 2018, 06:27:16 pm
Hi there,

The file is /conf/config.xml but you will lose integrity checking.

Depending on the changes, you will need to reload subsystems maybe from the GUI or shell, but there are many so we have to list the right scripts for you to use.


Cheers,
Franco
Title: Re: can I save Opensense configuration to text file, edit and reload it?
Post by: fabian on November 20, 2018, 06:32:55 pm
sure in the backup section you can download the current configuration (XML), edit it and upload it again (you need to reload all affected areas or reboot afterwards - in that case the filter). Please note that this is dangerous because an invalid configuration may cause lots of trouble (up to preventing the machine from booting).
Title: Re: can I save Opensense configuration to text file, edit and reload it?
Post by: Aloist on November 20, 2018, 11:02:03 pm
Thank you.
I had found the info, after asking the question.