How can I block a list of about 1.4 million IP addresses? I've already tried to do it with iptables PREROUTING, like:
-A PREROUTING -d IP_HERE/32 -j DROP
But with this many records, my bandwidth goes down like crazy when I do a speedtest.
Without blocked IPs in iptables:
1 Gb/s
With blocked IPs in iptables:
3 Mb/s at peak.
I want to use XDP_DROP like here (last step):
https://blog.cloudflare.com/how-to-drop-10-million-packets/
But I don't have an idea how to use this. :/ (I'm really bad at programing)
Are there alternatives to this approach?