CentOS error with iptables recent module

centosiptables

This is the rule in iptables for stop sync_flood attacks:

iptables -A INPUT -m state --state NEW -p tcp -m tcp --syn \
-m recent --name synflood --set

iptables -A INPUT -m state --state NEW -p tcp -m tcp --syn \
-m recent --name synflood --update --seconds 1 --hitcount 60 -j DROP

Error:

iptables: Unknown error 4294967295

I don't know what exactly to do, this ocurrs when insert the last rule "-m recent –name synflood –update –seconds 1 –hitcount 60 -j DROP"

Here the kernel version

2.6.18-274.12.1.el5PAE

Best Answer

A quick search on Google for your error message lead to CentOS bug 3632, which says:

This is not a bug. You should increase maximum possible value for --hitcount parameter (20 by default) by setting ipt_recent module option ip_pkt_list_tot.

For example:

# cat /etc/modprobe.d/ipt.conf 
options ipt_recent ip_pkt_list_tot=200

Then reload module ipt_recent.

You're setting hitcount to 60, so this sounds like it's probably the root of your problem.

Related Topic