Thanks, guys. Here's the backstory: another of my client's email accounts got hacked yesterday. Between about 1:30am and 9am, 22115 emails were sent through her account from 9351 unique IP addresses; most only sent one or two, and most of these addresses appear to be in eastern Europe and the far east. I run fail2ban on password failures, but that's not effective against these botnets because while a single IP may only attempt a couple times a day, the total number of attempts on an account in a day can be in the thousands.
My plan is to block countries' CIDR blocks using ipdeny's (
http://www.ipdeny.com/ipblocks/) zone files for the countries to block. Even after aggregating the zone files with a perl script (from
http://zwitterion.org/software/aggregat ... addresses/), the list is very big. Enter ipset, which provides a way to give iptables a hashed lookup mechanism for these large blocks of addresses. I want to do it this way for performance reasons and to keep my iptables config manageable as I will also continue to use fail2ban.
When trying to use ipset (apt-get install xtables-addons-common) I get this:
Code:
ipset v4.2: Kernel ip_set module is of protocol version 6.I'm of protocol version 4.
Please upgrade your kernel and/or ipset(8) utillity.
Then if I install just ipset (apt-get install ipset) I get this:
Code:
ipset v2.5.0: ipset kernel/userspace version mismatch
Perhaps ipset or your kernel needs to be upgraded.
help?
Thanks,
-Bart