You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The dbip data is provided as ranges of IP addresses -- not CIDR subnets. While nftables does support this format (known as intervals) the hash:net set type from ipset does not so the ranges must be converted to CIDR notation first. It is possible to store IP ranges in the ipsetbitmap:ip set type but this has a fixed size entry of 65536 which is smaller than some of the country sets.
Since nftables supports CIDR notation as well, for simplicity conversion is currently done regardless of which firewall type is provided - but the conversion is expensive.
maxmind provides data in CIDR notation so no conversion is needed. This is the source the better performance for maxmind (~3s) vs. dbip (~11s)
Update the dbip logic to avoid conversion if only the nftables firewall type is requested.
For the iptables firewall type, investigate whether dbip ranges can be provided as is to the ipsetbitmap:ip set type. If so, update the dbip logic to use this set type for any sets with fewer than 65536 entries and only use the hash:net set type (which requires conversion) for larger sets.
The text was updated successfully, but these errors were encountered:
The
dbip
data is provided as ranges of IP addresses -- not CIDR subnets. Whilenftables
does support this format (known as intervals) thehash:net
set type fromipset
does not so the ranges must be converted to CIDR notation first. It is possible to store IP ranges in theipset
bitmap:ip
set type but this has a fixed size entry of 65536 which is smaller than some of the country sets.Since
nftables
supports CIDR notation as well, for simplicity conversion is currently done regardless of which firewall type is provided - but the conversion is expensive.maxmind
provides data in CIDR notation so no conversion is needed. This is the source the better performance for maxmind (~3s) vs.dbip
(~11s)dbip
logic to avoid conversion if only thenftables
firewall type is requested.dbip
logic to use this set type for any sets with fewer than 65536 entries and only use thehash:net
set type (which requires conversion) for larger sets.The text was updated successfully, but these errors were encountered: