How to Reset IPDB and cPFence Firewall to Default State?

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.

 

  • ipdb, reset
  • 0 Kunder som kunne bruge dette svar
Hjalp dette svar dig?

Relaterede artikler

How to Fix Bulk IP Blacklisting or Whitelisting Issues in cPFence?

If you're facing issues when attempting to bulk blacklist or whitelist IPs in cPFence, the most...

How to Automate Blocking with Online IP Blacklists in cPFence?

cPFence provides a robust IP Database (IPDB) that dynamically adapts to new threats by updating...

Why cPFence May Not Block Certain Connections?

cPFence is designed to intelligently handle incoming traffic and block malicious or abusive...

Am I Under a DDoS Attack? I See Hundreds of GET Requests in the Logs

Read Also: How to Address High Server Load Issues with cPFence? If you're noticing hundreds of...

Why Does a Whitelisted IP Still Appear in cPFence Stats?

If you’ve whitelisted an IP in cPFence but it still appears in the statistics, there’s no need to...