revert acktionban back, use norestored option

pull/2455/head
Sergey G. Brester 5 years ago committed by GitHub
parent 9327218843
commit 4ae00485b0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -30,6 +30,9 @@
[Definition]
# bypass reporting of restored (already reported) tickets:
norestored = 1
# Option: actionstart
# Notes.: command executed on demand at the first ban (or at the start of Fail2Ban if actionstart_on_demand is set to false).
# Values: CMD
@ -55,20 +58,7 @@ actioncheck =
# Values: CMD
#
tmpfile = "/var/run/fail2ban/last-log-<name>.time"
actionban = if [ ! -e "<tmpfile>" ]
then
# if the file doesn't exist yet, create it
touch -d @<time> "<tmpfile>"
curl --fail --data-urlencode "server=<email>" --data "apikey=<apikey>" --data "service=<service>" --data "ip=<ip>" --data-urlencode "logs=<matches><br>" --data 'format=text' --user-agent "<agent>" "https://www.blocklist.de/en/httpreports.html"
fi
if [ $(stat -c %%X "<tmpfile>") -lt <time> ]
then
# If the time of the offense is later than the last ban, actually report it to blocklist.de
touch -d @<time> "<tmpfile>"
curl --fail --data-urlencode "server=<email>" --data "apikey=<apikey>" --data "service=<service>" --data "ip=<ip>" --data-urlencode "logs=<matches><br>" --data 'format=text' --user-agent "<agent>" "https://www.blocklist.de/en/httpreports.html"
fi
actionban = curl --fail --data-urlencode "server=<email>" --data "apikey=<apikey>" --data "service=<service>" --data "ip=<ip>" --data-urlencode "logs=<matches><br>" --data 'format=text' --user-agent "<agent>" "https://www.blocklist.de/en/httpreports.html"
# Option: actionunban
# Notes.: command executed when unbanning an IP. Take care that the

Loading…
Cancel
Save