Large number of invalid packets detected

Brice Figureau brice+nginx at
Sun May 18 18:43:08 MSD 2008

On Sun, May 18, 2008 09:11, Rt Ibmer wrote:
> Hi all - I'm using the latest version of nginx 6 and recently put iptables
> in place.
> I am seeing a significant number of matches for the following iptables
> rule:
>   iptables -A INPUT -m state --state INVALID -j LOG --log-prefix
>   iptables -A INPUT -m state --state INVALID -j DROP

You didn't show us what was important: the log that was produced.

If the rejected packet was a ACK/FIN, then it is harmless.
On busy servers conntrack removes the connection from its table as soon as
it gets the FIN packet. When the ACK/FIN then comes, the connection is not
known and this is not a SYN. It logs it as invalid.

This could also have been a scan (nmap can trigger invalid packets too).

What kernel version are you running?
I remember that there was some issues around about tcp reopening
in nf_conntrack, see this commit for more information:;a=commit;h=b2155e7f70b3f058efe94c0c459db023b05057bd
It was definitely fixed around Maybe you encounter this problem.

Brice Figureau
Days of Wonder

More information about the nginx mailing list