Update security_manager.py

This commit is contained in:
MacRimi
2026-02-12 19:43:52 +01:00
parent 86789f677a
commit 4396d57e3d

View File

@@ -793,11 +793,11 @@ def apply_missing_jails():
if "proxmox" not in current_jails: if "proxmox" not in current_jails:
try: try:
# Create filter with journalmatch for systemd backend. # Create filter with journalmatch for systemd backend.
# With backend=systemd, fail2ban receives only the MESSAGE field. # No ^ anchor: fail2ban prepends timestamp+hostname to journal MESSAGE.
# We use _SYSTEMD_UNIT instead of _COMM (Proxmox truncates _COMM). # _SYSTEMD_UNIT used instead of _COMM (Proxmox truncates _COMM).
# Proxmox logs IPs as ::ffff:x.x.x.x (IPv4-mapped IPv6). # Proxmox logs IPs as ::ffff:x.x.x.x (IPv4-mapped IPv6).
filter_content = """[Definition] filter_content = """[Definition]
failregex = ^(pvedaemon\\[\\d+\\]:\\s+)?authentication (failure|error); rhost=(::ffff:)?<HOST> user=.* msg=.*$ failregex = authentication (failure|error); rhost=(::ffff:)?<HOST> user=.* msg=.*
ignoreregex = ignoreregex =
journalmatch = _SYSTEMD_UNIT=pvedaemon.service journalmatch = _SYSTEMD_UNIT=pvedaemon.service
""" """