IP banned, but I still receive alerts

An attacker keeps attacking one of my servers, his ip has been detected and banned by crowdsec but he can continue to attack. Why and how can I stop him from doing so? Scenario triggered : LePresidente/http-generic-403-bf
24 Replies
CrowdSec
CrowdSec9mo ago
Important Information
Thank you for getting in touch with your support request. To expedite a swift resolution, could you kindly provide the following information? Rest assured, we will respond promptly, and we greatly appreciate your patience. While you wait, please check the links below to see if this issue has been previously addressed. If you have managed to resolve it, please use run the command /resolve or press the green resolve button below.
Log Files
If you possess any log files that you believe could be beneficial, please include them at this time. By default, CrowdSec logs to /var/log/, where you will discover a corresponding log file for each component.
Guide Followed (CrowdSec Official)
If you have diligently followed one of our guides and hit a roadblock, please share the guide with us. This will help us assess if any adjustments are necessary to assist you further.
Screenshots
Please forward any screenshots depicting errors you encounter. Your visuals will provide us with a clear view of the issues you are facing.
© Created By WhyAydan for CrowdSec ❤️
iiamloz
iiamloz9mo ago
Which remediations components are you using?
bbuddha
bbuddhaOP9mo ago
No description
No description
bbuddha
bbuddhaOP9mo ago
so far I've received 40 alerts from the same ip
bbuddha
bbuddhaOP9mo ago
No description
iiamloz
iiamloz9mo ago
Okay and is the webserver installed on host or a container?
bbuddha
bbuddhaOP9mo ago
host
iiamloz
iiamloz9mo ago
hmmm, and which backend are you using for the bouncer?
bbuddha
bbuddhaOP9mo ago
Good question, what do you mean by ‘backend’?
iiamloz
iiamloz9mo ago
if it using iptables or nftables, you can find this by grep mode /etc/crowdsec/bouncers/*.yaml
bbuddha
bbuddhaOP9mo ago
ooooooooh, ok. it uses iptables. I tried to create an iptables rule in shorewall, but it doesn't seem to change anything
No description
bbuddha
bbuddhaOP9mo ago
No description
iiamloz
iiamloz9mo ago
okay can you run iptables -L
bbuddha
bbuddhaOP9mo ago
ye what do you want me to do next ?
iiamloz
iiamloz9mo ago
within the output of iptables -L do you see the chain on INPUT to jump to our chains?
bbuddha
bbuddhaOP9mo ago
no
iiamloz
iiamloz9mo ago
hmm okay, can you run systemctl restart crowdsec-firewall-bouncer and then recheck the output of iptables -L afterwards
bbuddha
bbuddhaOP9mo ago
okay, a CROWDSEC_CHAIN has just appeared
iiamloz
iiamloz9mo ago
Okay do you have any external software that is manipulating the iptables chains? ahhh I guess shorewall is flushing the chains when it manipulates them and this is removing our chain
bbuddha
bbuddhaOP9mo ago
hmmmmmm, maybe ye I use shorewall on a lot of servers and I don't have this kind of problem.
iiamloz
iiamloz9mo ago
As in you use the firewall remediation and shorewall ?
bbuddha
bbuddhaOP9mo ago
but interesting, I'll try to explore a bit more the sorewall and crowdsec part and how it impacts crowdsec yes
iiamloz
iiamloz9mo ago
cause now since the jump is in place, it will start blocking the IP's that crowdsec detects but if the chain is flushed then this will obviously cause an issue since its gone. The firewall remediation only inserts the jump chain on startup and currently doesnt monitor if it gets removed by an external source (this is something we want to do at some point as it can be confusing if it disapeers and you start getting lots of alerts)
bbuddha
bbuddhaOP9mo ago
okay, for the moment it seems to be working, I'll check on other servers if I have the same problem

Did you find this page helpful?