diff --git a/config/action.d/xarf-login-attack.conf b/config/action.d/xarf-login-attack.conf index 6580cd8a..568d9d5c 100644 --- a/config/action.d/xarf-login-attack.conf +++ b/config/action.d/xarf-login-attack.conf @@ -1,7 +1,6 @@ # Fail2Ban action for sending xarf Login-Attack messages to IP owner # -# This requires querycontact ( http://pypi.python.org/pypi/querycontacts/ ) -# sudo pip install querycontacts +# This requires the dig command from bind-utils # # This uses the https://abusix.com/contactdb.html to lookup abuse contacts. # @@ -28,8 +27,8 @@ actionstop = actioncheck = -actionban = ADDRESSES=`querycontacts ` - IP= +actionban = oifs=${IFS}; IFS=.;SEP_IP=( ); set -- ${SEP_IP} ;ADDRESSES=$(dig +short -t txt -q $4.$3.$2.$1.abuse-contacts.abusix.org); IFS=${oifs} + IP= FROM= SERVICE= FAILURES= @@ -42,7 +41,7 @@ actionban = ADDRESSES=`querycontacts ` (printf -- %%b "
\n\n\n${MATCHES}\n"; date '+Note: Local timezone is %%z (%%Z)'; tail -n | grep '[^0-9][^0-9]'; - printf -- %%b "