mirror of https://github.com/fail2ban/fail2ban
Merge pull request #493 from grooverdan/xarf-ipmatch
ENH: use ipmatches for action xarf-login-attackpull/523/head
commit
a1a219189f
|
@ -43,7 +43,7 @@ actionban = oifs=${IFS}; IFS=.;SEP_IP=( <ip> ); set -- ${SEP_IP} ;ADDRESSES=$(di
|
||||||
FROM=<sender>
|
FROM=<sender>
|
||||||
SERVICE=<service>
|
SERVICE=<service>
|
||||||
FAILURES=<failures>
|
FAILURES=<failures>
|
||||||
MATCHES=<matches>
|
MATCHES='<matches>'
|
||||||
REPORTID=<time>@`uname -n`
|
REPORTID=<time>@`uname -n`
|
||||||
TLP=<tlp>
|
TLP=<tlp>
|
||||||
PORT=<port>
|
PORT=<port>
|
||||||
|
@ -51,8 +51,7 @@ actionban = oifs=${IFS}; IFS=.;SEP_IP=( <ip> ); set -- ${SEP_IP} ;ADDRESSES=$(di
|
||||||
if [ ! -z "$ADDRESSES" ]; then
|
if [ ! -z "$ADDRESSES" ]; then
|
||||||
(printf -- %%b "<header>\n<message>\n<report>\n${MATCHES}\n";
|
(printf -- %%b "<header>\n<message>\n<report>\n${MATCHES}\n";
|
||||||
date '+Note: Local timezone is %%z (%%Z)';
|
date '+Note: Local timezone is %%z (%%Z)';
|
||||||
tail -n <loglines> <logpath> | grep '[^0-9]<ip>[^0-9]';
|
printf -- %%b "<ipmatches>\n\n<footer>") | <mailcmd> <mailargs> ${ADDRESSES//,/\" \"}
|
||||||
printf -- %%b "<footer>") | <mailcmd> <mailargs> ${ADDRESSES//,/\" \"}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
actionunban =
|
actionunban =
|
||||||
|
|
Loading…
Reference in New Issue