Skip to content

vestingz/fail2ban-xmpp-action

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

fail2ban xmpp action

An action that lets you send xmpp messages.

Usage

Prerequisites

The actual send job is delegated to sendxmpp.

Installation on debian:

# apt install sendxmpp

Preparation

sendxmpp itself needs a resource file which holds the account information of the sender:

fail2ban@my-xmpp-server.net my-secret-password

Don't forget to protect the file after creation:

# chmod 600 .sendxmpprc

Installation

Just copy the action file into your actions.d folder:

# cp xmpp.conf /etc/fail2ban/actions.d

Configuration

Here is an example configuration in the jail.local:

[DEFAULT]
destxmpp = your-account@jabber.de
xmpprcfile = /root/.sendxmpprc

[sshd]
port    = ssh
logpath = %(sshd_log)s
action  = xmpp[destxmpp="%(destxmpp)s", rcfile="%(xmpprcfile)s", name=%(__name__)s, bantime="%(bantime)s"]

You need to define two values:

  • destxmpp: this is the receving xmpp account
  • xmpprcfile: the path to your prepared sendxmpp resource file

About

fail2ban rule to notify via XMPP

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published