fail2ban autoreport to abuseipdb.com


1

我想在fail2ban(Debian Jessie)中创建对abuseipdb.com的自动报告。

这是我的/etc/fail2ban/action.d/abuseipdb.conf

[Definition]
actionstart =
actionstop =
actioncheck =
actionban = curl --data 'key=<apikey>' --data 'category=<category>' --data 'ip=<ip>' --data-urlencode 'comment=<matches>' --user-agent 'fail2ban v0.8.12' 'https://www.abuseipdb.com/report/json'
actionunban =

[Init]
apikey = xxxx

我编辑了我/etc/fail2ban/jail.conf

...
# Here we use a combination of Netfilter/Iptables and IPsets
# for storing large volumes of banned IPs
#
# IPset comes in two versions. See ipset -V for which one to use
# requires the ipset package and kernel support.
[ssh-iptables-ipset4]

enabled = true
port     = ssh
filter   = sshd
banaction = iptables-ipset-proto4
   abuseipdb[category=18]
logpath = /var/log/auth.log
maxretry = 3
...

但它没有正确报告。任何人都可以帮我修复配置吗?

Answers:


2

此配置适用于fail2ban 0.9.5。我从SID安装它。步骤如下:安装所有依赖包:

# apt-get install gamin systemd python-pyinotify python-dnspython python3-pyinotify

下载从SID从主池的fail2ban 0.9.5-1安装程序直接http://ftp.us.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.5-1_all.deb

# wget http://ftp.us.debian.org/debian/pool/main/f/fail2ban/fail2ban_0.9.5-1_all.deb

删除现有的fail2ban 0.8.13

# apt-get --purge remove fail2ban

您现在可以开始安装fail2ban 0.9.5-1

# dpkg -i fail2ban_0.9.5-1_all.deb

我创建了一个注释,在Debian Jessie上面分享上面的所有步骤:从SID安装fail2ban 0.9.5-1


谢谢,这实际上是我找到的唯一解决方案。
孤儿
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.