If you’ve whitelisted an IP in cPFence but it still appears in the statistics, there’s no need to worry. This behavior occurs because the stats function in cPFence reads the historical data stored in the server's syslog files. Whitelisting an IP prevents future actions against it but does not clear its previous entries in the logs.
How to Clear cPFence Stats for Whitelisted IPs?
To start fresh and remove old entries from the stats, you can clear the syslog files using the following command:
find /var/log -maxdepth 1 -name "syslog*" ! -name "*.gz" -exec truncate -s 0 {} \;
This command will truncate all syslog files (except compressed ones), effectively resetting the logs and clearing old entries from the statistics.
Important Notes
-
Whitelisting an IP ensures that cPFence will no longer block or act against it in the future.
-
Clearing syslog files is optional and will not affect the current functionality or protections provided by cPFence.
-
It is recommended to back up your logs if you need to retain historical data for future reference.
Need Further Assistance?
If you have any questions or encounter issues, please contact our support team via your client portal.