Powershell module to manipulate OPNsense's config.xml format
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.gitattributes
LICENSE
OpnSenseInterface.Tests.ps1
OpnSenseInterface.psm1
OpnSenseVLAN.Tests.ps1
OpnSenseVLAN.psm1
OpnSenseXMLConfig.Tests.ps1
OpnSenseXMLConfig.psm1
PoshOpnSense.psd1
README.md
Util.Tests.ps1
Util.psm1

README.md

PoshOpnSense

This (will become) a PowerShell module to manipulate OPNsense's config.xml format.

General functionality/workflow will be:

  • Download configuration file by using the backup export functionality of OPNsense.
  • Parse and load configuration file into memory
  • Use PowerShell cmdlets provided by this module to interrogate and manipulate select aspects of the configuration
  • Write out a new config.xml file.
  • Upload configuration file to the OPNsense box.

I do not aim for complete coverage of all of config.xml, just enough to scratch my own itches. Patches welcome!

Usage

  1. Clone the repository into C:\Users\yourusername\Documents\WindowsPowershell\Modules, such that there is a file named C:\Users\yourusername\Documents\WindowsPowershell\Modules\PoshOpnSense\PoshOpnSense.psd1 (if you prefer it elsewhere on your filesystem, read about how to import modules or set PowerShell's module path.
  2. Open up Powershell and start working with the cmdlets.