I’ve been using crowdsec for months now but I’ve noticed that decisions don’t seem to work on my server.
I even tried to reinstall my iptables bouncer but it didn’t help.
When I test simple scenarios like ssh-bf or basicauth-bf I can see that I trigger alerts and decisions, but the attacking IP doesn’t really get banned so can keep attacking forever.
I didn’t know there was this logfile but now it’s very interesting because I don’t know why http://localhost:8080/ wouldn’t be available, I can see the service running right now on port 8080.
I remember switching the database from SQLite to MySQL a few weeks ago, I don’t know if it could be related but I made sure to migrate all the data properly.
Any idea?
UPDATE:
So I just restarted the bouncer and now it seems to work:
It seems that the error happens when my server starts up and maybe at this time the api isn’t available yet… But then after failing it never tries to restart and try again.
Yes, if at bouncer startup the API isn’t available, it will fail and not retry. However, if the API fails at runtime, it will retry on a regular basis. Might surprise at first, but we didn’t want the service to be “pretending” to run while actually not being able to speak to the API.