Fail2ban¶
Info
This integration allows for notifications from Fail2ban ban and jail events
Trigger options¶
Triggers¶
Ban- Receive a notification when an IP is banned by Fail2banUnban- Receive a notification when an IP is unbanned by Fail2banJail Start- Receive a notification when a Fail2ban jail startsJail Stop- Receive a notification when a Fail2ban jail stops
Channels¶
- Setup the channel(s) to use for sending Fail2ban notifications
Configuration¶
Integration Settings¶
Show IP Map- Display a map for the banned IP address in the notificationUnban Command- The command to execute when unbanning an IP (default:fail2ban-client unban {ip})
Each trigger has customizable notification color, pings, and layout options.
Setup¶
- To make setup easier; set the following variables
Variables¶
Instructions¶
-
Open a shell on the server where Fail2ban is installed.
-
Change to the Fail2ban actions directory. Adjust the path if your installation is different.
- Download the Notifiarr Fail2ban action file.
- Configure the Notification - Option A: Edit the
notifiarr.conffile and update the hostname and API key.
-
Configure the Notification - Option B: Use sed to Update the hostname and API key:
-
Configure your
jail.localfile:
Open your jail configuration:
Add notifiarr as an action to the relevant jails or default settings:
- Restart Fail2ban to apply the changes.