Skip to content

A very simple method of implementing Pushover notifications via fail2ban

License

Notifications You must be signed in to change notification settings

Operator873/fail2ban-pushover-notifications

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fail2ban-pushover-notifications

A very simple method of implementing Pushover notifications via fail2ban

Installation

  1. Update pushover.sh with your Pushover tokens, else it won't work.
  2. Add pushover.log and pushover.sh to your /etc/fail2ban folder. Ensure proper permissions are set for the script.
  3. Add pushover.conf to /etc/fail2ban/action.d/
  4. You must add the following to /etc/fail2ban/jail.local
action_ph = %(action_)s
            pushover[name="%(__name__)s", bantime="%(bantime)s"]
  1. Then change your default action to the new action.
    action = %(action_ph)s

  2. (optional) You can also override a jail action and keep the standard if you less push notifications.

[sshd]
action = %(action_)s
         pushover[name="%(__name__)s", bantime="%(bantime)s"]

After thoughts

It's worth saying that the Pushover priority levels probably should be changed to match what you want.

As is, thanks to overseas activity, there is a lot of fraudulent ssh attempts happening everywhere now. So the Pushover notification can become quite noisy at times. If such is the case, to avoid alert fatigue, I'd open pushover.sh and change Line 17 to PUSHOVER_PRIORITY=-1 and Line 22 to PUSHOVER_PRIORITY=-2 to lower the noise level.

In the future, I may try to add the ability to specify different priorities based on jail configuration.

About

A very simple method of implementing Pushover notifications via fail2ban

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages