# Send Fail2Ban notifications to Slack, via the chat.postMessage API method # Add your Slack API token and channel at end of this file # Author: Gavin Botica # gbotica@gmail.com [Definition] # Option: actionstart # Notes.: command executed once at the start of Fail2Ban. # Values: CMD actionstart = curl -s -o /dev/null 'https://slack.com/api/chat.postMessage' -d 'token=' -d 'channel=#' -d 'parse=none' -d "text=:white_check_mark: **: jail ** started" # Option: actionstop # Notes.: command executed once at the end of Fail2Ban # Values: CMD actionstop = curl -s -o /dev/null 'https://slack.com/api/chat.postMessage' -d 'token=' -d 'channel=#' -d 'parse=none' -d "text=:negative_squared_cross_mark: **: jail ** stopped" # Option: actioncheck # Notes.: command executed once before each actionban command # 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 address # number of failures #