I'm using CrowdSec on pfSense Plus 24.03 and noticed that the crowdsec_blacklists and crowdsec6_blacklists PF tables are often empty, while the crowdsec-firewall-bouncer is working as it should. I narrowed the problem down to the filter_configure_sync function of pfSense.
The easiest way to reproduce it is to call /etc/rc.filter_configure_sync:
# /sbin/pfctl -t crowdsec_blacklists -T show | wc -l
56019
# /etc/rc.filter_configure_sync
755 addresses deleted.
56019 addresses deleted.
# /sbin/pfctl -t crowdsec_blacklists -T show | wc -l
0
In practice I saw two use-cases where this happens:
- When having have two pfSense instances and Configuration Synchronization configured, every time you save a change on the primary instance, it reloads everything on the secondary instance, causing the tables to get cleared on the secondary.
- When using Time Based Rules, pfSense adds a line to the
/etc/crontab, that is clearing the tables every 15 minutes:
0,15,30,45 * * * * root /etc/rc.filter_configure_sync
Ideally the CrowdSec package would hook into the filter_configure_sync function and either prevents that the entries get removed or adds them back immediately.
I'm using CrowdSec on pfSense Plus 24.03 and noticed that the
crowdsec_blacklistsandcrowdsec6_blacklistsPF tables are often empty, while thecrowdsec-firewall-bounceris working as it should. I narrowed the problem down to thefilter_configure_syncfunction of pfSense.The easiest way to reproduce it is to call
/etc/rc.filter_configure_sync:In practice I saw two use-cases where this happens:
/etc/crontab, that is clearing the tables every 15 minutes:0,15,30,45 * * * * root /etc/rc.filter_configure_syncIdeally the CrowdSec package would hook into the
filter_configure_syncfunction and either prevents that the entries get removed or adds them back immediately.