Tima32 / xdp-firewall

2 stars 0 forks source link

Max entries #1

Open mrbluecoat opened 1 month ago

mrbluecoat commented 1 month ago

Is there a maximum number of IP addresses that can be blocked?

Tima32 commented 1 month ago

Yes. The configuration file has a size limit (I don't know the size). The code specifies a limit of 255 filters. If you block an IP with the add command, you can block 255 addresses. You can use the diap command to block a range, for example 192.168.25.0 - 192.168.25.255. This will block 255 addresses but will only take up one filter cell. If that's not enough for you, you can experiment with the limit. https://github.com/Tima32/xdp-firewall/blob/d91b73b9372c9950c15ab2ea924c52055108b785/firewall/firewall-bpf-commands.cpp#L392C2-L392C17