Meu e-mail do servidor Ubuntu étrabalhando. Eu verifiquei com este comando abaixo.
echo "Mail is working on this server." | mail -s subject <[email protected]>
Em todo o meujail.local
ex. intrusoIP=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
O IP parece ter sido banido quando a tentativa de ssh com credenciais de banimento falhou 5 vezes e também recebi o e-mail, mas não sei por que o curl não está acionando minha API.
Estou faltando alguma coisa?
eu tentei
[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 =