shorewall — Shorewall's dynamic blacklist

Blocks via Shorewall's dynamic blacklisting, driving the shorewall(8) and shorewall6(8) commands. Nothing is created at init — the dynamic blacklist is always there; banning is one command per IP.

[kur.sshd]
backend = "shorewall"

[kur.sshd.options]
type = "drop"

How it works

IPv4 IPs go through the shorewall command, IPv6 through shorewall6 — the kur dispatches per the banned IP's family.

Requirements

Settings

Options

| option | default | what | |------------------|--------------|------------------------------------------------| | type | drop | drop silently drops; reject sends a reject | | shorewall_cmd | shorewall | the shorewall binary, used for IPv4 | | shorewall6_cmd | shorewall6 | the shorewall6 binary, used for IPv6 |

What each operation runs

| operation | commands | |------------|-------------------------------------------------------------------| | init | nothing — the dynamic blacklist needs no setup | | ban | <shorewall[6]_cmd> <type> <ip> | | unban | <shorewall[6]_cmd> allow <ip> | | list | no command — the kur's own ban book | | check | shorewall show dynamic exits 0; plus shorewall6 show dynamic when any IPv6 ban exists | | flush | allow per banned IP | | re_init | teardown (best effort), init, re-drop every banned IP | | teardown | allow per banned IP (ban book kept for re_init) |

self_heal and reloads

check only verifies the shorewall command answers — and shorewall6 too, but only while something IPv6 is actually banned, so hosts without shorewall6 installed are not flagged unhealthy. A shorewall restart clears the dynamic blacklist without failing check, so the recovery path for a restart is ereshkigal re-init [<kur>], or a kur restart re-banning from the tablet. If Shorewall restarts are part of your routine, pair them with a re-init.

Gotchas