Appending Firewall Rules
-
I have a sort of template of rules I would like to import to my firewall. The problem is, when importing them, the existing rules get overwritten. Is there a way I can append the rules without clearing out the existing ones, whether GUI or CLI?
-
@needhelp404 Not without manually adding them to the firewall by hand individually or modifying the config you're importing to have the other rules as well.
-
Hi @needhelp404 In case to avoid the "existing rules get overwritten". All you have to do is to "backup" the current configuration, edit the .xml file adding your "template rules" in the order so that you don't delete existing rules.
STEP 1
Diagnostics > Backup & Restore > Backup Configuration-
Select the target rules
-
Edit and Apply
Diagnostics > Backup & Restore > Restore Backup -
Restore area "Rules Edited"
-
Choose File "Edited Files"
Just it. Good luck!
-
-
@rcoleman-netgate Bummer, I figured but thought I'd see what the pros had to say. I appreciate your response.
-
@needhelp404 One of the issues you have with appending is that rules are read in a top-to-bottom order and where would appended rules go? It's a PITB, yeah, but the best solution is manually changing the file and reimporting.