aboutsummaryrefslogtreecommitdiff
path: root/Fail2Ban/matrix.conf
diff options
context:
space:
mode:
authorOxbian <got.dacs@slmail.me>2023-04-28 19:03:32 +0200
committerOxbian <got.dacs@slmail.me>2023-04-28 19:03:32 +0200
commit123e38b970c6b58e2614fe39f7889cf1e29527f0 (patch)
treed75d5fe663e6a2bd75442565688dcbbaf9232906 /Fail2Ban/matrix.conf
parent2970e7e6a999a2133b4d5539c045dc55b454705d (diff)
downloadmatrix-monitoring-123e38b970c6b58e2614fe39f7889cf1e29527f0.tar.gz
matrix-monitoring-123e38b970c6b58e2614fe39f7889cf1e29527f0.zip
Adding Fail2Ban monitoring / matrix message
Diffstat (limited to 'Fail2Ban/matrix.conf')
-rw-r--r--Fail2Ban/matrix.conf25
1 files changed, 25 insertions, 0 deletions
diff --git a/Fail2Ban/matrix.conf b/Fail2Ban/matrix.conf
new file mode 100644
index 0000000..a4686de
--- /dev/null
+++ b/Fail2Ban/matrix.conf
@@ -0,0 +1,25 @@
+# Fail2Ban configuration file
+#
+# Author: Oxbian
+#
+#
+# Must be placed in the /etc/fail2ban/action.d folder
+
+[INCLUDES]
+
+before = mail-whois-common.conf
+
+[Definition]
+
+# Option: actionban
+# Notes: command executed when banning an IP. Take care that the
+# command is executed with Fail2Ban user rights.
+# Tags: See jail.conf(5) man page
+# Values: CMD
+#
+actionban = YOUR_MATRIX_SH_PATH -s "The IP <ip> has just been banned by
+ Fail2Ban after <failures> attempts against <name>. \n\n Here is more infromations about <ip>:\n
+ `%(_whois_command)s`"
+
+[Init]
+init = YOUR_MATRIX_SH_PATH -s "Fail2Ban Matrix Notification enabled."
ArKa projects. All rights to me, and your next child right arm.