From 93272188430d0d856ed29a5e040748e4d41c8b99 Mon Sep 17 00:00:00 2001 From: Noel Kuntze Date: Sat, 29 Jun 2019 01:39:38 +0200 Subject: [PATCH 1/3] Improved blocklist_de action to not resend bans that were already reported --- config/action.d/blocklist_de.conf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/config/action.d/blocklist_de.conf b/config/action.d/blocklist_de.conf index ba6d427b..d8a4b3e5 100644 --- a/config/action.d/blocklist_de.conf +++ b/config/action.d/blocklist_de.conf @@ -54,7 +54,21 @@ actioncheck = # Tags: See jail.conf(5) man page # Values: CMD # -actionban = curl --fail --data-urlencode "server=" --data "apikey=" --data "service=" --data "ip=" --data-urlencode "logs=
" --data 'format=text' --user-agent "" "https://www.blocklist.de/en/httpreports.html" + +tmpfile = "/var/run/fail2ban/last-log-.time" + +actionban = if [ ! -e "" ] + then + # if the file doesn't exist yet, create it + touch -d @