feat(jail-config): add banaction and banaction_allports to blocklist config

Adds iptables-multiport and iptables-allports ban actions to the blocklist-import jail configuration and updates the corresponding test assertions.
This commit is contained in:
2026-05-10 09:35:33 +02:00
parent 79df1aa493
commit 7790736918
2 changed files with 4 additions and 0 deletions

View File

@@ -51,6 +51,8 @@ maxretry = 1
findtime = 1d
bantime = 86400
ignoreip = 127.0.0.0/8 ::1 172.16.0.0/12
banaction = iptables-multiport
banaction_allports = iptables-allports
"""
_BLOCKLIST_IMPORT_LOCAL = """\

View File

@@ -68,6 +68,8 @@ class TestEnsureJailConfigs:
# Blocklist-import jail must have a 24-hour ban time
blocklist_conf = _read(jail_d, _BLOCKLIST_CONF)
assert "bantime = 86400" in blocklist_conf
assert "banaction = iptables-multiport" in blocklist_conf
assert "banaction_allports = iptables-allports" in blocklist_conf
# .local files must set enabled = true and nothing else
for local_file in (_MANUAL_LOCAL, _BLOCKLIST_LOCAL):