Skip to content

Instantly share code, notes, and snippets.

@parrazam
Created June 4, 2020 15:03
Show Gist options
  • Save parrazam/98c00937ebad788ff77599c2fb18988a to your computer and use it in GitHub Desktop.
Save parrazam/98c00937ebad788ff77599c2fb18988a to your computer and use it in GitHub Desktop.
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