If you’ve made many whitelist/blacklist changes and are seeing unexpected behavior, follow this guide to reset the cPFence Firewall and IPDB back to a clean default state.
Warning: These steps will clear your custom allow/deny lists (IPv4 & IPv6). You may want to back up the files first.
Step 1: Flush In-Memory Blocklists And Whitelists
Clear the current IP sets used by cPFence:
ipset flush cPFence-blocklist
ipset flush cPFence-ipv6-blocklist
ipset flush cPFence-whitelist
ipset flush cPFence-ipv6-whitelist
Step 2: Reset Persistent IPDB Lists
Empty the persistent whitelist/blacklist files (IPv4 & IPv6):
> /opt/cpfence/user-config/cpfipdb/blacklistips.txt
> /opt/cpfence/user-config/cpfipdb/blacklistips_v6.txt
> /opt/cpfence/user-config/cpfipdb/whitelistips.txt
> /opt/cpfence/user-config/cpfipdb/whitelistips_v6.txt
Step 3: Restart cPFence
Apply the clean state by restarting cPFence services:
cpfence --restart
After restart, your firewall/IPDB will be in default state. Re-add only the rules you need via the WebUI or CLI.
Need Further Assistance?
If you encounter any issues or need help , please reach out to our support team via your client portal.