Using an ipset to block IPs [closed]
Here's an example
ipset create banned_hosts hash:net family inet hashsize 1048576 maxelem 1500000 counters comment
Here's the iptables rule
iptables -t nat -A PREROUTING -i eth0 -m set --match-set banned_hosts src -j DROP