pfSense Audit and Backup
1. Overview
This runbook captures the complete pfSense configuration state before migrating to VyOS. The backup enables instant rollback if issues occur during migration.
2. Phase 1: Export XML Configuration
2.1. 1.1 WebUI Export
-
Login to pfSense:
pfsense-01.inside.domusdigitalis.dev -
Navigate to: Diagnostics → Backup & Restore
-
Select: All areas
-
Click: Download configuration as XML
-
Save as:
pfsense-backup-YYYYMMDD.xml
3. Phase 2: Document Firewall Rules
# SSH to pfSense and export rules
ssh pfsense-01 "pfctl -sr" > /tmp/pfsense-firewall-rules.txt
TODO: Add pfSense CLI commands for rule export
8. Phase 7: Verify Backup Integrity
# Verify XML is valid
xmllint --noout /path/to/pfsense-backup-*.xml && echo "XML valid"
# Check file size (should be > 10KB typically)
ls -lh /path/to/pfsense-backup-*.xml
9. Rollback Procedure
If VyOS migration fails and you need to restore pfSense:
-
Power on pfSense VM:
sudo virsh start pfSense-FW01 -
Login to WebUI
-
Navigate to: Diagnostics → Backup & Restore
-
Browse to backup XML file
-
Click: Restore Configuration
-
Reboot when prompted