* Iptables find invalid packets
@ 2008-07-21 12:20 Dimitri GOURDON
2008-07-21 12:58 ` Bernhard Bock
2008-07-21 13:06 ` Vladislav Kurz
0 siblings, 2 replies; 10+ messages in thread
From: Dimitri GOURDON @ 2008-07-21 12:20 UTC (permalink / raw)
To: netfilter
Hi all,
I've setup LVS on a box using Keepalived (and Iptables) to load balance
traffic between 2 web servers. I have a problem :
A lot of TCP packets with FIN or RST flags (all I think) from clients
are dropped by Iptables as state INVALID. The consequence is that I have
a lot of connection in FIN_WAIT state (shown by netstat) on the 2 web
servers...
I have reproduced this on my lab...
I have sniff packets with tcpdump to see flags, ACK number,... I've
found nothing bad.
I have tried to accept these packets with Iptables and then, all my
connections are terminated in a normal way (only 1-2 connection(s) stay
in FIN_WAIT on web servers).
I know I can play with TCP timeout to reduce this behavior, but I'll
prefer correct the problem. I don't understand why these packets are
invalid if when I accept them, the connections end normaly...
Google is NOT my friend on this issue.
Is someone can help me ???
Dimitri Gourdon
Linux Web Administrator
Itool systems
PS : Sorry for my poor english !
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Iptables find invalid packets
2008-07-21 12:20 Iptables find invalid packets Dimitri GOURDON
@ 2008-07-21 12:58 ` Bernhard Bock
2008-07-21 13:23 ` Dimitri GOURDON
[not found] ` <48849E47.30901@itool.com>
2008-07-21 13:06 ` Vladislav Kurz
1 sibling, 2 replies; 10+ messages in thread
From: Bernhard Bock @ 2008-07-21 12:58 UTC (permalink / raw)
To: Dimitri GOURDON; +Cc: netfilter
Hi Dimitri,
Dimitri GOURDON wrote:
> A lot of TCP packets with FIN or RST flags (all I think) from clients
> are dropped by Iptables as state INVALID. The consequence is that I have
> a lot of connection in FIN_WAIT state (shown by netstat) on the 2 web
> servers...
[...]
> Is someone can help me ???
Sounds a bit like the problem I've asked about a few days ago. Try to
increase the hashsize of nf_conntrack. My INVALID packets vanished after
this (at least as long as I wasn't using conntrackd for stateful failover).
best regards
Bernhard
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Iptables find invalid packets
2008-07-21 12:58 ` Bernhard Bock
@ 2008-07-21 13:23 ` Dimitri GOURDON
[not found] ` <48849E47.30901@itool.com>
1 sibling, 0 replies; 10+ messages in thread
From: Dimitri GOURDON @ 2008-07-21 13:23 UTC (permalink / raw)
To: Bernhard Bock, netfilter
I will try but don't believe it :
I've reproduce the same behavior in my lab with only 1 client... so... I
try ;)
Dimitri
Bernhard Bock a écrit :
> Hi Dimitri,
>
> Dimitri GOURDON wrote:
>> A lot of TCP packets with FIN or RST flags (all I think) from clients
>> are dropped by Iptables as state INVALID. The consequence is that I
>> have a lot of connection in FIN_WAIT state (shown by netstat) on the
>> 2 web servers...
> [...]
>> Is someone can help me ???
>
> Sounds a bit like the problem I've asked about a few days ago. Try to
> increase the hashsize of nf_conntrack. My INVALID packets vanished
> after this (at least as long as I wasn't using conntrackd for stateful
> failover).
>
> best regards
> Bernhard
^ permalink raw reply [flat|nested] 10+ messages in thread[parent not found: <48849E47.30901@itool.com>]
* Re: Iptables find invalid packets
[not found] ` <48849E47.30901@itool.com>
@ 2008-07-21 14:39 ` Bernhard Bock
2008-07-21 15:01 ` Dimitri GOURDON
2008-07-21 15:44 ` Dimitri GOURDON
0 siblings, 2 replies; 10+ messages in thread
From: Bernhard Bock @ 2008-07-21 14:39 UTC (permalink / raw)
To: Dimitri GOURDON; +Cc: netfilter
Dimitri GOURDON wrote:
> There are 2 parameters that can perhaps help me :
>
> cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
> 65520
> cat /proc/sys/net/ipv4/netfilter/ip_conntrack_buckets
> 8190
>
> I can modify the first on the fly (the problem is the same : no change)
> But not the second...
Depending on your kernel version, you may have to set the value when
loading the module. Try to insert the following line in
/etc/modprobe.conf (or similar, depending on your linux distribution):
options nf_conntrack hashsize=16384
best regards
Bernhard
^ permalink raw reply [flat|nested] 10+ messages in thread* Re: Iptables find invalid packets
2008-07-21 14:39 ` Bernhard Bock
@ 2008-07-21 15:01 ` Dimitri GOURDON
2008-07-21 15:44 ` Dimitri GOURDON
1 sibling, 0 replies; 10+ messages in thread
From: Dimitri GOURDON @ 2008-07-21 15:01 UTC (permalink / raw)
To: Bernhard Bock; +Cc: netfilter
Bernhard Bock a écrit :
> Dimitri GOURDON wrote:
>> There are 2 parameters that can perhaps help me :
>>
>> cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
>> 65520
>> cat /proc/sys/net/ipv4/netfilter/ip_conntrack_buckets
>> 8190
>>
>> I can modify the first on the fly (the problem is the same : no change)
>> But not the second...
>
> Depending on your kernel version, you may have to set the value when
> loading the module. Try to insert the following line in
> /etc/modprobe.conf (or similar, depending on your linux distribution):
>
> options nf_conntrack hashsize=16384
>
> best regards
> Bernhard
I work on Debian and I don't find similar file or this kind of parameters...
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Iptables find invalid packets
2008-07-21 14:39 ` Bernhard Bock
2008-07-21 15:01 ` Dimitri GOURDON
@ 2008-07-21 15:44 ` Dimitri GOURDON
2008-07-21 16:02 ` Bernhard Bock
1 sibling, 1 reply; 10+ messages in thread
From: Dimitri GOURDON @ 2008-07-21 15:44 UTC (permalink / raw)
To: Bernhard Bock, netfilter
Bernhard Bock a écrit :
> Dimitri GOURDON wrote:
>> There are 2 parameters that can perhaps help me :
>>
>> cat /proc/sys/net/ipv4/netfilter/ip_conntrack_max
>> 65520
>> cat /proc/sys/net/ipv4/netfilter/ip_conntrack_buckets
>> 8190
>>
>> I can modify the first on the fly (the problem is the same : no change)
>> But not the second...
>
> Depending on your kernel version, you may have to set the value when
> loading the module. Try to insert the following line in
> /etc/modprobe.conf (or similar, depending on your linux distribution):
>
> options nf_conntrack hashsize=16384
>
> best regards
> Bernhard
Finally, I've successed to modify the 2 parameters. I have respectively
modify them with 131072 and 16384. And the problem stay entire...
Thanks.
Have you other ideas ???
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Iptables find invalid packets
2008-07-21 15:44 ` Dimitri GOURDON
@ 2008-07-21 16:02 ` Bernhard Bock
0 siblings, 0 replies; 10+ messages in thread
From: Bernhard Bock @ 2008-07-21 16:02 UTC (permalink / raw)
To: Dimitri GOURDON; +Cc: netfilter
Hi,
Dimitri GOURDON wrote:
> Finally, I've successed to modify the 2 parameters. I have respectively
> modify them with 131072 and 16384. And the problem stay entire...
Well, it certainly worked for me. You may try to increase these values
further. Apart from this, I do not have any idea. I do, however, use a
newer kernel (2.6.25). So upgrading your kernel - as proposed by others
- may help. YMMV.
best regards
Bernhard
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: Iptables find invalid packets
2008-07-21 12:20 Iptables find invalid packets Dimitri GOURDON
2008-07-21 12:58 ` Bernhard Bock
@ 2008-07-21 13:06 ` Vladislav Kurz
[not found] ` <48849F8F.70103@itool.com>
1 sibling, 1 reply; 10+ messages in thread
From: Vladislav Kurz @ 2008-07-21 13:06 UTC (permalink / raw)
To: netfilter
On Monday 21 of July 2008, Dimitri GOURDON wrote:
> Hi all,
>
> I've setup LVS on a box using Keepalived (and Iptables) to load balance
> traffic between 2 web servers. I have a problem :
>
> A lot of TCP packets with FIN or RST flags (all I think) from clients
> are dropped by Iptables as state INVALID. The consequence is that I have
> a lot of connection in FIN_WAIT state (shown by netstat) on the 2 web
> servers...
I have similar problem, and asked about it here. I was told to try newer
kernel (I run debian stable - 2.6.18). However I didn't upgrade yet, but If
you run the same kernel as I do and upgrade would help you I'd like to here
about that.
--
Regards
Vladislav Kurz
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-07-21 16:02 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-21 12:20 Iptables find invalid packets Dimitri GOURDON
2008-07-21 12:58 ` Bernhard Bock
2008-07-21 13:23 ` Dimitri GOURDON
[not found] ` <48849E47.30901@itool.com>
2008-07-21 14:39 ` Bernhard Bock
2008-07-21 15:01 ` Dimitri GOURDON
2008-07-21 15:44 ` Dimitri GOURDON
2008-07-21 16:02 ` Bernhard Bock
2008-07-21 13:06 ` Vladislav Kurz
[not found] ` <48849F8F.70103@itool.com>
2008-07-21 14:49 ` Vladislav Kurz
[not found] ` <4884A414.10408@itool.com>
2008-07-21 15:11 ` Vladislav Kurz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox