How to send notifications from Linux fail2ban, ssh auth and other actions to Slack

For this approach i will use my script to send messages to Slack. More info about it you can find –


How to install and configure fail2ban you can find for example here –

Now edit fail2ban jail.local file

add “slack” hook where you want to use it. For example:

Now create new config file for slack action:

copy/paste it

put to bin folder & restart fail2ban service


add to file:

and finaly

And results:

slack post message example
slack post message example

Leave a Reply

Your email address will not be published. Required fields are marked *