Update security_manager.py

This commit is contained in:
MacRimi
2026-02-12 18:58:39 +01:00
parent c4b1820d08
commit 2099bbe58f

View File

@@ -792,10 +792,13 @@ def apply_missing_jails():
# so pvedaemon logs go to the systemd journal, not /var/log/daemon.log. # so pvedaemon logs go to the systemd journal, not /var/log/daemon.log.
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
# from the journal (without the "pvedaemon[PID]:" prefix).
# The journalmatch already filters to pvedaemon entries.
# Optional prefix for compatibility with file-based backends.
filter_content = """[Definition] filter_content = """[Definition]
failregex = pvedaemon\\[.*authentication (failure|error); rhost=<HOST> user=.* msg=.* failregex = ^(pvedaemon\\[\\d+\\]:\\s+)?authentication (failure|error); rhost=<HOST> user=.* msg=.*$
pvedaemon\\[.*\\]: authentication failure; rhost=<HOST>
ignoreregex = ignoreregex =
journalmatch = _COMM=pvedaemon journalmatch = _COMM=pvedaemon
""" """