Mac firewall guides

Back up and move your firewall rules

Export Outbound’s rule store before you move to another Mac or make big changes. Import replaces your user rules and keeps the managed, blocklist and rule-group rules already in the store.

Updated

Step by step

  1. Export to a file. Run outboundctl rules export rules-backup.json from a directory you can write to. Keep the output file somewhere you back up.
  2. Inspect the export. Open the JSON file in a text editor and check that the rules you expect are there. Treat process paths and internal destinations as sensitive.
  3. Prepare the destination Mac. Install and set up the Outbound release you want on the new Mac. Before you import anything, export its current rules to a separate file.
  4. Import your user rules. Run outboundctl rules import rules-backup.json. The command validates the file, then replaces your user rules with the user rules in the export.
  5. Test important connections. On the new Mac, check exact paths and signing identities, then try the apps you normally use. If something is wrong, import the backup you made of that Mac to get its previous user rules back.

The commands

outboundctl rules export rules-backup.json
outboundctl rules import rules-backup.json
outboundctl rules list

The CLI’s import only touches user rules. MDM policy, blocklist subscriptions and profile settings don’t come across with it, and any managed or blocklist rules in the imported file are ignored.

By default Outbound asks you to approve a command-line change, and a rule import is one. Run in a terminal, outboundctl rules import prints Waiting for your decision in Outbound… until you answer in the app (add --no-wait to return at once). Run with sudo it applies directly.

The automatic backup

The rule store keeps the previous file as a backup and can fall back to it if the main file is corrupt. Before a change you’ve planned, make your own export as well.

The app has its own backup too. In Settings › General › Backup, Back Up… saves your rules and settings to a file and Restore… puts them back, and Snapshots before updates lists the copy of your rules Outbound saves before each update. On the command line, outboundctl backup <path> backs up rules and settings and outboundctl backup restore <file> restores them.

Moving from another firewall

Outbound imports Little Snitch rule groups (.lsrules), the rules.json file LuLu exports, hosts files and domain lists, OpenSnitch rule folders and Portmaster exports saved as JSON: in the Rules pane open the More menu and choose Import Rules…, or run outboundctl rules import-lsrules, import-lulu, import-list, import-opensnitch or import-portmaster (see the rules manual). A preview shows what the import adds and changes before anything is saved, and lists every rule Outbound can’t express exactly under Not imported, with the reason. Re-create those rules by hand and test them. Renaming another product’s export file won’t work. Importing rules from another firewall has the details. LuLu’s official documentation describes its own export and import options, and each product has its own format.

The Outbound steps are written for Outbound 1.5.3 and its command-line help. Download Outbound. Sources for other products and for macOS are linked where they’re used.