zEitEr
Super Moderator
Wasn't 127.0.0.2 used for RBL stuff? So testing with that won't work.
Not too sure. I've just search which test IP can be used for this. You might try any other.
Wasn't 127.0.0.2 used for RBL stuff? So testing with that won't work.
I tried 192.168.10.1 and as expected no report to abuseipdb. Expected because other cluster reports generated by csf themselves, also did not report to abuseipdb.You might try any other.
Yep indeed. Otherwise I will do what I thought before and just disable the clustering and only use the report option.so it's up to you to test the things.
Does any AbuseIPDB recorded logs ever report Cluster member reports? Maybe AbuseIPDB is filtering them out as they'd be considered duplicates?I tried 192.168.10.1 and as expected no report to abuseipdb. Expected because other cluster reports generated by csf themselves, also did not report to abuseipdb.
I now removed the extra line from the perl script and see if reporting is still done.
Yes, see post #28.Does any AbuseIPDB recorded logs ever report Cluster member reports?
Up to post #66 - sooo longYes, see post #28.
#!/usr/bin/perl
# This file was written as an executable to be used in the auto report function
# of csf and lfd. By replacing $YOUR_API_KEY below with your abuseipdb api key,
# allows you to use this code to integrate your csf system with abuseipdb.com
use strict;
use warnings;
use HTTP::Tiny;
use JSON;
use POSIX qw(strftime);
# Gather the information from the commandline passed by lfd
my $ports = $ARGV[1];
my $inout = $ARGV[3];
my $message = $ARGV[5];
my $logs = $ARGV[6];
my $trigger = $ARGV[7];
my $comment = $message . "; Ports: " . $ports . "; Direction: " . $inout . "; Trigger: " . $trigger . "; Logs: " . $logs;
my $ua = HTTP::Tiny->new;
$comment =~ s/Cluster member.*said,/***/g;
log_str("Reporting: ". $comment);
my $url = 'https://api.abuseipdb.com/api/v2/report';
my $data = {
ip => $ARGV[0],
comment => $comment,
categories => 14
};
my %options = (
"headers", {
"Key" => "YOUR_API_KEY",
"Accept" => "application/json"
},
);
my $response = $ua->post_form($url, $data, \%options);
my $json = JSON->new;
my $output = $json->pretty->encode($json->decode($response->{'content'}));
if ($response->{'status'} == 200){
print "Report Succesful!\n" . $output;
} elsif ($response->{'status'} == 429) {
print $output;
} elsif ($response->{'status'} == 422) {
print $output;
} elsif ($response->{'status'} == 401) {
print $output;
}
log_str("Response: ". $output);
sub log_str
{
my ($str) = @_;
my $date = localtime();
open (LOG, ">> /var/log/lfd_abuseipdb.log");
print LOG "${date}: ${str}\n";
close(LOG);
}
Better change the topic name to reflect the contentYeah it's 4 pages already... lot of read work.
Glad you like. Been deploying my scripts on all my servers tooOooh yes... I use a tool now which makes everything perfect, even masking, reporting in the correct category and all.
Have al ook at this one.
GitHub - centminmod/centminmod-abuseipdb-reporter: CSF Firewall and AbuseIPDB API integration with specific focus on data privacy and prevention of sensitive data leaked to public AbuseIPDB database report
CSF Firewall and AbuseIPDB API integration with specific focus on data privacy and prevention of sensitive data leaked to public AbuseIPDB database report - centminmod/centminmod-abuseipdb-reportergithub.com