Take the 2-minute tour ×
Server Fault is a question and answer site for professional 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

i.e.

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

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 ?

thanks

share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.