How to Import M0n0wall Rules?

Started by TheLatestWire, December 30, 2015, 11:59:07 PM

Previous topic - Next topic
Sorry if I'm missing something obvious. I looked through the documentation, did some google searches and searched through the GUI, but I can't seem to find a way to import my m0n0wall rules. Is this possible? Or can I edit a single file on the console and insert them? Most of the rules are specific CIDR network denies.

December 31, 2015, 08:31:06 PM #1 Last Edit: December 31, 2015, 10:07:24 PM by ObecalpEffect
I'm

IIRC you can't. The config files are one big bunch of settings, and importing that will either fail or mess things up beyond repair.
Hobbyist at home, sysadmin at work. Sometimes the first is mixed with the second.

I think it should not be too difficult if you know what you are doing.

In OPNsense WebGUI, go to System ==> Config Manager ==> Backups.
In the download part of the screen (top half), select Firewall Rules in the Backup area dropdown and download the XML.

You could edit the XML file and upload the edited file again using the Restore part of the screen (bottom half).
Select Firewall Rules in the Restore area dropdown, browse to the file and restore it.

I think that should work.