Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Fail2Ban custom actions
[Definition]
# Option: actionstart
# Notes : command executed once at the start of Fail2Ban
# Tags :
# Values: CMD
actionstart =
# Option: actionstop
# Notes : command executed once at the end of Fail2Ban
# Tags :
# Values: CMD
actionstop = /home/yo/publicarNotif.sh "Fail2Ban se está deteniendo..."
# Option: actioncheck
# Notes : command executed once before each actionban command
# Tags :
# Values: CMD
actioncheck =
# Option: actionban
# Notes : command executed when banning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags : <ip> IP address
# <failures> number of failures
# <time> unix timestamp of the ban time
# Values: CMD
actionban = /home/yo/publicarNotif.sh "<failures> intento(s) de acceso con la IP <ip>"
# Option: actionunban
# Notes : command executed when unbanning an IP. Take care that the
# command is executed with Fail2Ban user rights.
# Tags : <ip> IP address
# <failures> number of failures
# <time> unix timestamp of the ban time
# Tags :
# Values: CMD
actionunban =
[Init]
name = sendnotif
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment