Meine Ubuntu-Server-Mail istArbeiten. Ich habe es mit dem folgenden Befehl überprüft.
echo "Mail is working on this server." | mail -s subject <[email protected]>
In meinem ganzenjail.local
Beispiel: EindringlingIP-Adresse=1.1.1.1
[sshd]
port = 2222
destemail = [email protected]
sendername = fail2ban
mta = mail
action = %(action_mwl)s
actionban = curl -s https://www.app.com/ssh/ban?ip=1.1.1.1
Die IP scheint gesperrt zu werden, wenn der SSH-Versuch mit gesperrten Anmeldeinformationen fünfmal fehlgeschlagen ist und ich auch die E-Mail erhalten habe, bin mir aber nicht sicher, warum Curl meine API nicht auslöst.
Übersehe ich etwas?
ich habe es versucht
[sshd]
port = 2222
destemail = [email protected]
sendername = fail2ban
mta = mail
bantime = 1m
maxretry = 1
action = %(action_mwl)s
banaction = %(curlAction)s <<<< ADDED ⭐️
curlAction.conf
[Definition]
actionstart =
actionstop =
actioncheck =
actionban = curl -s https://www.app.com/ssh/ban?ip=1.1.1.1
actionunban =