About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.
pfSense raises There were error(s) loading the rules when the packet filter rejects the rule set pfSense generated from its configuration. The message carries a line number in /tmp/rules.debug and the text of that line. The new rule set did not load. Find the line, find which setting generated it, and fix that setting rather than the symptom.
What the error means
In pfSense's filter.inc, reload_filter() writes the generated rule set to /tmp/rules.debug and loads it with /sbin/pfctl -o basic -f on that file. If pfctl fails, the code builds a message in this form: There were error(s) loading the rules: /tmp/rules.debug:NN: <pfctl message> - The line in question reads [NN]: <text of the line>. It records that message as a notice and as the filter reload status. When pfctl reports a busy device, pfSense retries up to 10 times, 200 milliseconds apart.
Reading the same function: when pfctl fails with a message that does not contain busy, the code loads /cf/conf/rules.debug.old if that file exists, and it saves a new rules.debug.old only after a successful load. When the message does contain busy, the code instead runs pfctl -d, pfctl -e and pfctl -f on rules.debug, which resets pf, and records "PF was wedged/busy and has been reset." If that is how your release behaves, the rule you just added is missing from the running rules after a failed reload, while older rules remain in the non-busy case. Netgate's pages do not describe this fallback. The public repository has no tag or release branch for pfSense 2.8 or later, so the release the Netgate pages describe cannot be matched to the pinned file.
Netgate's troubleshooting page points to the same place: "the ruleset may not be reloading properly. Check Status > Filter Reload to see if an error is displayed." Its section on rules that fail to load says "it may have an obvious fix, or search for that error to find possible resolutions."
Two documented limits can make the whole load fail. The Firewall Maximum Table Entries setting defaults to 400,000 and caps the address tables used for aliases, and the Netgate page says "If the value of this setting is not large enough to contain the entire content all the aliases, the firewall may fail to load the ruleset." The Alias Features page says "The total size of all aliases/tables must fit in roughly half the amount of Firewall Maximum Table Entries".
Likely causes
| Cause | What you see | How to confirm |
|---|---|---|
| A rule, option or custom line holds a value pf cannot parse | The message names one line in rules.debug and a pf parse error |
pfctl -nf /tmp/rules.debug reports the same line |
| Aliases are larger than the table limit allows | The load fails after a large alias or list is added or grows | Total alias entries exceed about half of Firewall Maximum Table Entries (default 400000, so about 200000) |
| A package writes a faulty rule | The reload output stops partway, at a package | Status > Filter Reload stops instead of ending with Done. |
| The packet filter was busy | A message about a busy device or a reset of pf | The text contains busy; a repeated reload succeeds |
| An edit made minutes earlier introduced the line | The error began after one change | Config History Diff shows the change |
Prove the cause before changing anything
1. Read the status page. Go to Status > Filter Reload and scroll to the end of the output. The Netgate page says to check "if the last line says Done. or if it stops". If it stops in a package, that package is the first suspect.
2. Read the failing line. In Diagnostics > Command Prompt, use the Shell Execute box. The Netgate page says it executes commands "as if they were run from a console command line" and that commands must stop on their own. Replace 40 and 50 with the line number from the message, a few lines either side:
sed -n '40,50p' /tmp/rules.debug
3. Parse the file without loading it. Netgate's page runs pfctl -f /tmp/rules.debug, which loads the rules. The FreeBSD pfctl manual gives -n as "Do not actually load rules, just parse them", so adding it makes the check read-only.
pfctl -nf /tmp/rules.debug
A good result prints nothing. A bad result prints the same file name, line number and pf message you saw in the notice.
4. See what is actually running. The manual says -s rules shows "the currently loaded filter rules".
pfctl -sr
If your newest rule is missing from this list, the failed reload is why.
5. Find what changed. Go to Diagnostics > Backup & Restore and open the Config History tab. The Netgate page explains that two entries can be selected and compared with the Diff button ("Compare" in pfSense Plus). Compare the last entry that worked with the current one.
6. For the table limit, count the aliases. Add up the entries of all aliases, especially URL table aliases and any package that fills aliases. Compare the total with half of Firewall Maximum Table Entries.
Fix
Fix whatever produced the failing line. The pf message names the line; the setting that produced it is a rule, a NAT entry, an alias, an advanced option or a package.
A faulty rule, alias entry or option
First save the current configuration. The Netgate backup page says to go to Diagnostics > Backup & Restore and click Download Configuration as XML. Keep the file; also note the newest entry in Config History.
Risk: the next steps change firewall configuration and apply it, so the rule set is reloaded. If the corrected setting still fails to load, your change will not take effect. A wrong correction can also block traffic that was passing.
Edit the rule, alias or option named by the failing line, save, and apply the change. Then go to Status > Filter Reload and click Reload Filter. The Netgate page says it "initiates a manual filter reload", and the output should end with Done.
To undo it: go to Diagnostics > Backup & Restore, open the Config History tab, find the entry from before your change, and restore it. The Netgate page warns that restoring this way "does not initiate an automatic reboot" (the page adds "Minor changes do not require a reboot, though reverting some major changes will") and that for firewall rules "a filter reload would be sufficient". Then reload the filter and check the status page. The page says the entry's configuration is restored; on that reading, every other configuration change made since that entry is removed as well.
Aliases larger than the table limit
First save the current configuration: go to Diagnostics > Backup & Restore, click Download Configuration as XML, keep the file, and note the newest entry in Config History.
Risk: the next change raises how much memory the firewall may use for address tables. The Netgate page says "A safe assumption is approximately 1K of memory per entry", so doubling the limit commits a lot of RAM, and too little RAM can make the firewall unstable.
At System > Advanced, on the Firewall & NAT tab, raise Firewall Maximum Table Entries. The page says to "comfortably include at least double the total amount of entries contained in all aliases combined". With 300,000 alias entries in all, that is at least 600,000. Memory at about 1K per entry is about 600 MB for 600,000 entries. Save, then reload the filter.
To undo it: restore the Config History entry from before the change, as above, and reload the filter. Alternatively, shrink the aliases so they fit.
A faulty package rule
If Filter Reload stops at a package, the Netgate page says "there may be a problem with that package". First save the current configuration: go to Diagnostics > Backup & Restore, click Download Configuration as XML, keep the file, and note the newest entry in Config History.
Risk: the next change alters or switches off a package's rules, which can open or close traffic the package was handling. Apply it only in a window where that is acceptable.
Correct or disable the package's rule settings in its own page, save, then reload the filter from Status > Filter Reload.
To undo it: restore the Config History entry from before the change, then reload the filter, as described for the first fix.
The filter was busy
In the code reading above, a message containing busy makes pfSense reset pf and reload rules.debug itself, and it records "PF was wedged/busy and has been reset." Reloading once more from the GUI is our suggestion; Netgate's pages give no fix for this message.
First save the current configuration: go to Diagnostics > Backup & Restore, click Download Configuration as XML, keep the file, and note the newest entry in Config History.
Risk: the next click re-applies the whole rule set, so traffic handling can change if the saved configuration differs from the rules now running.
Go to Status > Filter Reload and click Reload Filter.
To undo it: a reload only re-applies the saved configuration, so there is nothing to restore. If traffic behaves differently afterwards, restore the history entry as in the first fix.
Example (illustrative): fw01 shows There were error(s) loading the rules: /tmp/rules.debug:312: <pf message> - The line in question reads [312]: .... In the Command Prompt, sed -n '308,316p' /tmp/rules.debug shows a rule whose port field was typed as a range with a typo. pfctl -nf /tmp/rules.debug prints the same line number, and pfctl -sr does not list the rule added that morning. The engineer downloads the configuration XML, fixes the port range in the rule, saves and applies, then reloads the filter. The status page ends with Done., pfctl -nf prints nothing, and pfctl -sr now lists the rule.
Confirm the fix
- Status > Filter Reload ends with
Done.and shows no error. pfctl -nf /tmp/rules.debugprints nothing.pfctl -srlists the rule you changed.- The traffic the rule is meant to pass or block behaves as intended.
What to watch afterwards
- After every rule or alias change, open Status > Filter Reload before closing the session.
- Keep the alias total below about half of Firewall Maximum Table Entries, and revisit it when lists are added.
- Download a configuration backup before large changes, and note the history entry number.
Read next
Related articles you may want next.
- Backup & RecoveryFirewall policy restore: state, order, and the path back to the consoleSeparate firewall policy, connection state, NAT and rule order when planning recovery, and verify the actual product’s reload and failover behaviour.Read article
- HostingValidating firewall changes for hosted application dependenciesHow to baseline required ports for hosted applications and verify connectivity after routine firewall rule changes—not post-incident policy restore.Read article
- TroubleshootingConnections Half-Work Through Two Gateways: Proving Asymmetric RoutingTwo gateways or a second NIC and connections reset or hang? Prove the return path with captures on both legs, then fix routing, not the firewall's state checks.Read article
Risks and limits
- These commands have not been run or lab-tested.
- The message wording and reload logic are a reading of
filter.incat a pinned commit (master, 2026-02-18); the public repository has no tag for pfSense 2.8 or later, so a specific release may differ. - pf's message after the line number varies with the fault.
- pfSense itself loads with
-o basic, which the FreeBSD manual lists as the default, sopfctl -nfparses the file the way the load does. - Restoring from Config History, on a reading of the page, replaces the whole configuration, not only the rule that failed.
Sources
- Troubleshooting Firewall Rules — Netgate pfSense documentation, last updated 2025-12-19, accessed 1 December 2026
- filter.inc — pfSense source repository, commit ddd366b (last commit to the file on master, 2026-02-18), accessed 1 December 2026
- Filter Reload Status — Netgate pfSense documentation, last updated 2025-08-27, accessed 1 December 2026
- Firewall & NAT — Netgate pfSense documentation, last updated 2026-04-24, accessed 1 December 2026
- Alias Features and Limitations — Netgate pfSense documentation, last updated 2025-12-16, accessed 1 December 2026
- Command Prompt — Netgate pfSense documentation, last updated 2025-12-16, accessed 1 December 2026
- Configuration Backup — Netgate pfSense documentation, last updated 2025-08-22, accessed 1 December 2026
- Restoring and Configuration History — Netgate pfSense documentation, last updated 2025-12-15, accessed 1 December 2026
- pfctl(8) — FreeBSD 15.0-RELEASE manual pages, no date shown, accessed 1 December 2026
This article was originally published on .