TSF – Giải pháp IT toàn diện cho doanh nghiệp SMB | HCM

P13 - Essential Backup and Restore pfSense Config Guide

Backup and Restore pfSense Config: Safe Configuration Guide

A proper backup strategy is critical for any network infrastructure. Firewalls such as pfSense often contain complex configurations including firewall rules, VPN settings, authentication systems, and routing policies. Losing this configuration can lead to significant downtime and security risks.

Fortunately, pfSense provides a built-in feature that allows administrators to backup and restore pfSense config quickly and safely using a simple XML configuration file.

In this guide, we will walk through the process of:

  • Creating a pfSense configuration backup

  • Restoring a pfSense configuration file

  • Understanding common restore issues

  • Learning best practices to avoid configuration problems

📺 Watch the video tutorial for the full step-by-step lab demonstration.


1️⃣ Backup pfSense Configuration

Backing up your pfSense configuration ensures that you can quickly recover your firewall in case of hardware failure, system corruption, or migration to a new device.

In pfSense, all configuration settings are stored inside a single XML file called config.xml.


Access the Backup Interface

Open the pfSense WebGUI:

 
IP: 192.168.16.1:8443
 

Navigate to:

 
Diagnostics → Backup & Restore
 

In the Backup Configuration section, you can download the current configuration.


Protect the Backup File

Before downloading the configuration file, it is strongly recommended to set a password.

This encrypts sensitive data stored inside the backup file.

 
Set a password for the config file (recommended)
 

After the backup process, the file that you receive will be:

 
config.xml
 

What Does the Backup File Contain?

The config.xml file contains nearly the entire firewall configuration.

This includes sensitive information such as:

 
Admin hash password
VPN keys
Shared secret
LDAP bind password
 

Because of this, the configuration file must be handled carefully.

👉 If this file is leaked, the entire firewall is exposed.

Anyone with access to the file may be able to reconstruct the firewall configuration or gain access to critical credentials.

For this reason, always store pfSense backups in a secure location such as encrypted storage or a protected backup server.


2️⃣ Restore pfSense Configuration

Restoring a configuration allows you to quickly rebuild a firewall using a previously saved configuration file.

This is commonly used when:

  • Replacing hardware

  • Migrating to a virtual machine

  • Recovering from system failure

  • Rebuilding a lab environment


Access the Restore Interface

Open the pfSense WebGUI:

 
IP: 192.168.16.2:80
 

Navigate to:

 
Diagnostics → Backup & Restore
 

Then restore the configuration file.

 
Restore Backup → Select XML file
 

After the restore process completes, pfSense will apply the configuration and reboot if required.


3️⃣ Common Restore Issues

Although restoring pfSense configuration files is straightforward, several situations may cause problems during the restore process.

Understanding these scenarios helps prevent downtime and troubleshooting complexity.


Restore to a Different pfSense Version

One of the most common issues occurs when restoring a configuration from one pfSense version to another.

Example:

 
Backup from 2.8
Restore to 2.7
 

In this scenario, compatibility issues may occur because newer versions may contain features or packages that older versions do not support.

Possible results include:

  • Package errors

  • Firewall rule conflicts

  • Service startup failures

👉 Always restore to the same or a higher version.

This ensures compatibility between configuration structures and installed packages.


Restore to a Machine with Different NIC Names

Another common issue occurs when restoring a configuration to hardware that uses different network interface names.

Example:

Old machine:

 
em0 = WAN
em1 = LAN
 

New machine (VM environment):

 
vtnet0
vtnet1
 

After restoring the configuration:

  • pfSense may not correctly map the interfaces

  • The firewall may assign WAN/LAN incorrectly

  • You may lose access to the WebGUI


Solution

Use the console menu to reassign interfaces.

 
Console:
1) Assign Interfaces
 

Then manually remap the interfaces:

 
Remap WAN/LAN
 

After reassigning the interfaces, the firewall should restore normal connectivity.


Restore in a Different Network Environment

Sometimes configurations are restored into a different network topology.

Example:

Original configuration:

 
LAN 192.168.16.1
 

New lab environment:

 
10.10.10.1
 

After restoring:

  • pfSense will still use 192.168.16.1

  • The administrator may attempt to access the wrong IP address

This may lead to confusion when trying to access the WebGUI.

Always verify the configured LAN address after restoring a configuration in a new environment.


Restore with HA / CARP Configuration

Another scenario involves restoring a configuration that contains High Availability settings.

If the backup file includes:

 
Virtual IP
CARP
XMLRPC sync
 

Restoring it into an environment without HA support may cause issues.

Possible problems include:

  • Virtual IP conflicts

  • Duplicate IP addresses

  • Network instability

Before restoring configurations containing HA features, ensure that the environment supports those features.


Best Practices for pfSense Backup

To maintain a reliable firewall infrastructure, administrators should implement a proper backup strategy.

Recommended practices include:

✔ Perform backups after major configuration changes
✔ Store backups in secure and encrypted locations
✔ Maintain multiple backup versions
✔ Document interface mappings and network topology

These practices ensure that your firewall can be quickly restored in case of system failure.


Conclusion

Understanding how to Backup and Restore pfSense config is an essential skill for network administrators. With the built-in pfSense backup system, you can easily protect your firewall configuration and recover from failures quickly.

A proper backup strategy allows you to:

✔ Recover firewall settings within minutes
✔ Migrate configurations to new hardware or virtual machines
✔ Protect critical network infrastructure from configuration loss

By combining regular backups with proper restore procedures, pfSense administrators can maintain high availability, strong security, and reliable network operations.

See also related articles

P16 – VLANs on pfSense Made Easy: UniFi Setup Guide

P16 – VLANs on pfSense Made Easy: UniFi Setup Guide https://youtu.be/ep78Pokpvqc 🚀 Configure VLANs on pfSense for UniFi Network (Beginner Guide) Segmenting your network using VLANs is a fundamental practice in modern IT systems. It improves security, performance, and manageability—especially when deploying wireless networks like UniFi. In this guide, you...

Read More

P15 – VoIP on pfSense Made Easy: QoS Priority Setup

Pfsense – P15 Configure QoS for VoIP on pfSense (IP Phone Priority Setup) https://youtu.be/ZAok_lCChjU 🚀 Configure QoS for VoIP on pfSense (IP Phone Priority Setup) In modern business environments, voice and video communication are critical. Without proper traffic control, applications like VoIP, Microsoft Teams, or Zoom can easily suffer from...

Read More

P14 – Upgrade pfSense Safely: 2.7 to 2.8 Guide

P14 – Upgrade pfSense Safely: 2.7 to 2.8 Guide https://youtu.be/r_8iU6MC0Bs 🚀 Upgrade pfSense 2.7 to 2.8 – Full Tutorial for Beginners Upgrading pfSense to a newer version is essential to maintain security, performance, and compatibility with modern network environments. In this guide, you’ll learn how to upgrade pfSense from version...

Read More