Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Is it possible to use iptable tables to rate limit an ipset ?

I know you can use ipset to create a block list named blacklist


ipset create blacklist hash:ip
iptables -I INPUT -m set --match-set blacklist src -j DROP
ipset add blacklist
ipset add blacklist

But how can you rate limit the ipset called blacklist ? Something like ?

iptables -I INPUT -m set --match-set blacklist src -p TCP --dport 80 -m hashlimit --hashlimit 50/sec --hashlimit-burst 10 --hashlimit-name blacklisthash -j DROP

is –hashlimit-mode srcip even needed ?


share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.