mirror of
https://github.com/fail2ban/fail2ban.git
synced 2026-03-11 08:55:31 +00:00
nftables.conf - add support for cidr notation
Currently when trying to add an address like: 141.98.11.0/24 it fails with:
fail2ban.utils [720]: ERROR 7fe8c36f6630 -- exec: nft add element inet f2b-table addr-set-custom \{ 141.98.11.0/24 \}
fail2ban.utils [720]: ERROR 7fe8c36f6630 -- stderr: "Error: You must add 'flags interval' to your set declaration if you want to add prefix elements"
After adding 'flags interval' one can ban ranges now as expected.
This commit is contained in:
parent
f81f85569d
commit
05575de1f1
1 changed files with 1 additions and 1 deletions
|
|
@ -55,7 +55,7 @@ _nft_for_proto-multiport-done = done
|
|||
_nft_list = <nftables> -a list chain <table_family> <table> <chain>
|
||||
_nft_get_handle_id = grep -oP '@<addr_set>\s+.*\s+\Khandle\s+(\d+)$'
|
||||
|
||||
_nft_add_set = <nftables> add set <table_family> <table> <addr_set> \{ type <addr_type>\; \}
|
||||
_nft_add_set = <nftables> add set <table_family> <table> <addr_set> \{ type <addr_type>\; flags interval\; \}
|
||||
<_nft_for_proto-<type>-iter>
|
||||
<nftables> add rule <table_family> <table> <chain> %(rule_stat)s
|
||||
<_nft_for_proto-<type>-done>
|
||||
|
|
|
|||
Loading…
Reference in a new issue