diff --git a/config/action.d/nftables.conf b/config/action.d/nftables.conf index 9ee55e89..c1fb8550 100644 --- a/config/action.d/nftables.conf +++ b/config/action.d/nftables.conf @@ -63,6 +63,14 @@ _nft_del_set = { %(_nft_list)s | %(_nft_get_handle_id)s; } | while read -r hdl; delete rule $hdl; done delete set
+# Option: _nft_shutdown_table +# Notes.: command executed after the stop in order to delete table (it checks that no sets are available): +# Values: CMD +# +_nft_shutdown_table = { list table
| grep -qP '^\s+set\s+'; } || { + delete table
+ } + # Option: actionstart # Notes.: command executed on demand at the first ban (or at the start of Fail2Ban if actionstart_on_demand is set to false). # Values: CMD @@ -86,6 +94,7 @@ actionflush = { flush set
2> /dev/n # Values: CMD # actionstop = %(_nft_del_set)s + <_nft_shutdown_table> # Option: actioncheck # Notes.: command executed once before each actionban command