Skip to main content
RunBook Academy

OPNsenseXL · Backup, Restore, Disaster RecoveryDisaster recovery

Full appliance disaster recovery — the runbook when the box is gone

Advanced⏱ ~18 minconfigctlsshipmitoolpfctl

What you'll learn

  • Execute the full-appliance DR runbook from hardware provisioning to traffic restored
  • Apply the rekeying discipline after a configuration restore from a compromised site
  • Conduct an offline DR test that proves the runbook without touching production
  • Close the loop with a lessons-learned cycle that updates the runbook

Prerequisites

Verified against OPNsense 25.x · FreeBSD 14.x · PF (FreeBSD packet filter) FreeBSD 14.x · Unbound 1.20+ · Kea DHCP OPNsense 25.x plugin · WireGuard in-kernel + OPNsense plugin · strongSwan (IPsec plugin) OPNsense 25.x plugin · OpenVPN 2.6.x · Suricata 7.x · 2026-08-14

Not yet marked complete on this device.

Full appliance disaster recovery is the scenario where the firewall itself is gone — hardware failure, site loss, ransomware on the management host that took the firmware with it. The operator must rebuild from scratch on new hardware and restore traffic within the recovery time objective the business has committed to. The runbook that makes this possible is not improvisation; it is a documented procedure tested offline.

This lesson covers the full-appliance DR runbook from site loss to traffic restored, the rekeying discipline that must follow any restore where the previous appliance’s secrecy is in doubt, the offline DR test that proves the runbook, and the lessons-learned cycle that updates the runbook for the next incident.

The DR runbook, end to end

A defensible full-appliance DR runbook is a numbered procedure with explicit checkpoints. The operator who follows it under pressure makes fewer mistakes than the operator who improvises. The runbook below assumes the worst case — the original hardware is destroyed, no replacement appliance is on-site, and the off-host backup is the only artefact the operator has.

StepActionTimeCheckpoint
1Confirm the loss. Distinguish hardware failure from configuration failure.5 minTwo operators agree the appliance is non-recoverable
2Provision a replacement appliance. Boot the OPNsense installer on identical hardware if available, or the closest available hardware if not.60 minInstaller reaches the console prompt
3Apply the most recent known-good backup. Use the single-user shell method or the GUI’s restore page.15 minFirewall boots with the restored configuration
4Remap interfaces if hardware differs from the source.15 minEach physical port serves its intended logical role
5Run the post-restore verification checklist.30 minEvery item in the checklist passes
6Rekey the credentials. Treat the restored appliance as compromised until rekeying is complete.30 minNew SSH keys, new GUI passwords, new RADIUS shared secrets, new IPsec PSKs
7Reconnect to the production network.10 minTraffic flows, monitoring confirms
8Update the off-host backup.5 minNew backup captures the post-DR configuration
9Document the incident.30 minTimeline, root cause, lessons learned, runbook updates

The total elapsed time is 3-4 hours for a disciplined operator with a current backup. Without a current backup, the time stretches to days: the operator must reconstruct the configuration from documentation, screenshots, and tribal knowledge, and the configuration is approximate at best.

The rekeying discipline

A restored configuration contains every credential the previous appliance held: SSH keys, GUI passwords, RADIUS shared secrets, IPsec PSKs, certificate private keys. If the disaster that destroyed the appliance also exposed the configuration — site breach, ransomware that exfiltrated first — those credentials are compromised. The restored firewall must rekey every credential, not because the restore is broken, but because the secrets are no longer secret.

The rekeying list:

CredentialRekey action
Local user passwordsReset via console or API; force rotation of any external identity provider
SSH host keysRegenerate via /etc/rc.d/ssh_keygen; update every known_hosts entry on management hosts
SSH user keysReissue to every operator; revoke old keys on the restored host
GUI certificateGenerate a new self-signed or ACME certificate
IPsec PSKsCoordinate with every peer; rotate PSKs on a known schedule
RADIUS / TACACS shared secretsCoordinate with the authentication server; rotate
WireGuard private keysGenerate new keys; redistribute public keys to peers
Certificate authorityIf the CA private key is suspected exposed, reissue the entire PKI
API keysRotate every API key; revoke the previous keys at the consumer

The rekeying is not optional. The operator who restores a configuration from a compromised site and skips rekeying has restored a compromised firewall.

The offline DR test

The DR runbook that has never been tested is folklore. The offline DR test takes the runbook from the page to the bench.

The test procedure:

  1. Schedule a maintenance window. The test is offline; production traffic is not affected. The window is announced.
  2. Stand up an isolated DR test bench. A second appliance (the cold spare, or a borrowed unit) is racked in a separate subnet, isolated from production.
  3. Use the latest production backup. The backup file is copied to the test bench via the off-host channel (proving the channel works).
  4. Walk the runbook step by step. Every operator who would be on call during a real DR is on the bench. They follow the runbook exactly as written.
  5. Measure elapsed time at each checkpoint. The measurements update the runbook’s time estimates.
  6. Verify the test bench traffic flow. Plug a test laptop into the LAN port, confirm DHCP, GUI, and external ping.
  7. Document gaps. Every step that took longer than expected, every missing detail, every unclear instruction becomes a runbook update.
  8. Tear down the test bench. Wipe the test appliance to factory defaults. The test artefact must not become a backdoor into production.

The offline DR test is conducted at least annually for critical firewalls, and after every major configuration change that touches the runbook (interface renumbering, IPsec topology change, additional plugins).

Read-only / SafeDR test — backup and copy
$ time configctl backup create plain && time scp /conf/backup/config-*.xml dr-testbench:/tmp/
real    0m3.214s
Backup created: /conf/backup/config-2026-08-15-1438.xml
real    0m1.892s
config-2026-08-15-1438.xml           100%  384KB   1.8MB/s   00:00

Illustrative output

The lessons-learned cycle

A DR that completes without a lessons-learned document is not a DR; it is a fire drill. The lessons-learned cycle closes the loop:

  1. Timeline. Document every step with timestamps. The timeline reveals which steps took longer than expected and which were skipped.
  2. Root cause. Why did the disaster happen? Was the failure preventable?
  3. Runbook gaps. Which steps were unclear? Which were missing? Which required improvisation?
  4. Backup verification. Did the backup work as expected? Were there restore errors? Were credentials intact?
  5. Communication. Who was notified? When? What was the escalation path?
  6. Improvements. Specific changes to the runbook, the backup cadence, the hardware staging, the rekeying schedule.

The lessons-learned document is filed, reviewed by the team, and turned into action items with owners and dates. The next DR test exercises the updated runbook. The cycle continues.

Summary

  • The DR runbook is a documented procedure with explicit checkpoints, not improvisation.
  • Rekeying is mandatory when the previous appliance’s secrecy is in doubt.
  • The offline DR test exercises the runbook without touching production.
  • Lessons learned turn each DR into an improved runbook for the next incident.
  • The cold spare at the site is the difference between a 4-hour DR and a 24-hour DR.

Knowledge check · 4 questions

  1. Q1. Your primary firewall has suffered a hardware failure that is not recoverable on-site. The replacement hardware is in storage at the same site. According to the disciplined DR runbook, what is the first step?

  2. Q2. After restoring a configuration from a backup taken at a compromised site, the operator should rekey every credential the firewall holds, including IPsec PSKs, RADIUS shared secrets, and SSH host keys.

  3. Q3. Which of the following are valid elements of the offline DR test procedure? Select all that apply.

  4. Q4. The DR completed successfully in 4 hours. What is the single most important follow-up action?

Passing score: 75%. Answers are checked in this browser.