OPNsense
  • Home
  • Help
  • Search
  • Login
  • Register

  • OPNsense Forum »
  • English Forums »
  • Tutorials and FAQs »
  • can I save Opensense configuration to text file, edit and reload it?
« previous next »
  • Print
Pages: [1]

Author Topic: can I save Opensense configuration to text file, edit and reload it?  (Read 2124 times)

Aloist

  • Newbie
  • *
  • Posts: 22
  • Karma: 2
    • View Profile
can I save Opensense configuration to text file, edit and reload it?
« 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?
Logged

franco

  • Administrator
  • Hero Member
  • *****
  • Posts: 10084
  • Karma: 762
    • View Profile
Re: can I save Opensense configuration to text file, edit and reload it?
« Reply #1 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
Logged

fabian

  • Hero Member
  • *****
  • Posts: 2436
  • Karma: 171
  • OPNsense Contributor (Language, VPN, Proxy, etc.)
    • View Profile
    • Personal Homepage
Re: can I save Opensense configuration to text file, edit and reload it?
« Reply #2 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).
Logged

Aloist

  • Newbie
  • *
  • Posts: 22
  • Karma: 2
    • View Profile
Re: can I save Opensense configuration to text file, edit and reload it?
« Reply #3 on: November 20, 2018, 11:02:03 pm »
Thank you.
I had found the info, after asking the question.
Logged

  • Print
Pages: [1]
« previous next »
  • OPNsense Forum »
  • English Forums »
  • Tutorials and FAQs »
  • can I save Opensense configuration to text file, edit and reload it?
 

OPNsense is an OSS project © Deciso B.V. 2015 - 2021 All rights reserved
  • SMF 2.0.17 | SMF © 2019, Simple Machines
    Privacy Policy
    | XHTML | RSS | WAP2