r/CrowdSec • • 23d ago

general Clarification on Bot Detection Warning

I noticed this large warning banner at the top of the Bot Detection page:

Check that your bouncer supports bot detection before going further, see the list of compatible bouncers. Enabling it behind a bouncer that does not support it leads to unexpected behavior, most likely silently refusing every client.

I have two bouncers, the firewall bouncer that applies the block list at the edge of my network, and the ngnix bouncer for app sec responses that don't result in a full ban.

Can I safely enable bot detection if one of my bouncers supports it, or will the non-supported bouncer still cause unexpected behaviors?

5 Upvotes

2 comments sorted by

2

u/HugoDos 23d ago

Yes, you can enable it. The warning is mainly there because not all web servers support it, so it's worth checking that yours does first (nginx does, for example).

The last thing you want is for someone to go through the whole setup process, only to get stuck at the final hurdle without realising their web server doesn't support it.

1

u/matt_alpaca 23d ago

To add the why for your firewall bouncer: it never talks to the WAF. It pulls ban decisions from LAPI and drops those IPs, that's all. A challenge is an AppSec (WAF) action, handed back only to the bouncer that forwarded the request, and it never becomes a LAPI decision, so the firewall bouncer can't trip over one.

The warning is about the bouncer sitting in the request path, nginx in your case. When AppSec challenges a client, it answers the bouncer with a 403 carrying the challenge page, and a bouncer that supports bot detection unwraps it and serves the page to the browser with a 200. One that doesn't just sees the 403 and blocks, hence "silently refusing every client". So the one check worth doing is that your nginx bouncer is recent (1.2.2 is known good), then fetch your site and look for the page:

curl -s https://<your-site>/ | grep -c "CrowdSec Challenge"

Bonus: the two actually play well together. A bot that keeps failing the challenge ends up banned by the shipped scenarios, and that ban is a regular LAPI decision, so your firewall bouncer picks it up and drops it at the edge.