How long does a blocked connection from Iptables last? Is there a way to set the timeout?

Posted by Josh on Server Fault See other posts from Server Fault or by Josh
Published on 2010-06-07T21:27:18Z Indexed on 2010/06/07 21:32 UTC
Read the original article Hit count: 316

Filed under:
|
|
iptables -A INPUT -m state --state NEW -m recent --set                  # If we receive more than 10 connections in 10 seconds block our friend.
iptables -A INPUT -m state --state NEW -m recent --update --seconds 5  --hitcount 15 -j Log-N-Drop

I have these two relevant rules from iptables. if more than 15 connections are made in 5 seconds it logs the attempt and blocks it. How long does iptables maintain the counter? Does it refresh if connections are attempted again?

© Server Fault or respective owner

Related posts about linux

Related posts about firewall