about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2024-03-25 15:29:45 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2024-03-25 15:43:07 +0700
commit5501dcba8757cd10888756aa7da0831d0cc5ac0a (patch)
tree39727cbafaa3637b65b15aa74b7ddb49e09e0fce
parent2df08459fab651912e9c6860b9b261f4c50ce0b8 (diff)
downloadnixos-conf-5501dcba8757cd10888756aa7da0831d0cc5ac0a.tar.gz
Add journalmatch for matching log
-rw-r--r--fail2ban-filters/maddy.conf1
-rw-r--r--fail2ban.nix1
2 files changed, 1 insertions, 1 deletions
diff --git a/fail2ban-filters/maddy.conf b/fail2ban-filters/maddy.conf
index b354315..68f18a1 100644
--- a/fail2ban-filters/maddy.conf
+++ b/fail2ban-filters/maddy.conf
@@ -7,3 +7,4 @@ before = common.conf
 _daemon = maddy
 
 failregex = authentication failed\s{"reason":"auth: invalid credentials","src_ip":"<HOST>
+journalmatch = _SYSTEMD_UNIT=maddy.service
diff --git a/fail2ban.nix b/fail2ban.nix
index 9aaa2e2..0301878 100644
--- a/fail2ban.nix
+++ b/fail2ban.nix
@@ -34,7 +34,6 @@
       maddy = {
         settings = {
           filter = "maddy";
-          logpath = "/var/log/maddy/maddy.log";
         };
       };
     };