No to szybciutko:

iptables -t mangle -N LICZNIK

iptables -t mangle -N LICZNIK
iptables -A PREROUTING -i eth1 -t mangle -m hashlimit --hashlimit 1/min --hashlimit-mode srcip --hashlimit-burst 1 --hashlimit-name ip_count --hashlimit-htable-expire 60000 -j LICZNIK

odczytanie tablicy:

wc -l /proc/net/ipt_hashlimit/ip_count | awk '{print $1}'

cyferki przy  –hashlimit-htable-expire to czas w msec , po tym czasie IP wypada z tablicy.