Auto blocking of IPS and reporting to AbuseIPDB

Post Reply
FutherForward20
Junior Member
Posts: 22
Joined: 03 Sep 2016, 13:56

Auto blocking of IPS and reporting to AbuseIPDB

Post by FutherForward20 »

Hi team

I am using CSF and mod Security. I have implemented an automated reporting facility to AbuseIPDB.

It all works well - except occasionally, it sends a report to AbuseIPDB but does not block in CSF

When that happens, this is what is reported in AbuseIPDB
(CT) IP 12.345.6.789 (CA/Canada/-) found to have 190 connections;
This is what shows in Hits List for Modsec (there are many entries similar)
2022-01-27 14:02:37 127.0.0.1 12.345.6.789 WARNING 400 920350: Host header is a numeric IP address Hide
Request: GET /cgi-sys/autodiscover.cgi
Action Description: Warning.
Justification: Pattern match "^[\\d.:]+$" at REQUEST_HEADERS:Host.
So the IP is being reported to AbuseIPDB and listed as bad in Cloudflare and showing as abusive in Modesc.....

However, when I check in CSF deny list, there is nothing found !

How can I automatically deny these such IPS in CSF ?
marcele
Junior Member
Posts: 214
Joined: 17 Sep 2007, 17:02

Re: Auto blocking of IPS and reporting to AbuseIPDB

Post by marcele »

Look at the DENY_IP_LIMIT and CT_PERMANENT options in /etc/csf/csf.conf. By default CT_PERMANENT is set to 0 meaning that connection tracking blocks are only temporary. Also If you set CT_PERMANENT to 1 then they will be permanent and will still rotate out depending on your DENY_IP_LIMIT.
Post Reply