All of lore.kernel.org
 help / color / mirror / Atom feed
* Connection tracking looses packets?
@ 2006-05-24 13:25 Justin Schoeman
  2006-05-24 14:02 ` Sietse van Zanen
  2006-05-26 12:19 ` Pascal Hambourg
  0 siblings, 2 replies; 4+ messages in thread
From: Justin Schoeman @ 2006-05-24 13:25 UTC (permalink / raw)
  To: netfilter

Hi all,

I am having problems with a firewall here.  The basic configuration 
works perfectly, but we have occasional problems with DNAT.  Long 
running sessions (we have found the problem on ftp, http, pop and smtp 
sessions) occasionally stall, and transfer no more data.  Looking at the 
firewall logs, I see:

INVALID NAT: IN=eth3 OUT= MAC=00:02:55:d6:eb:ae:00:11:bc:25:96:80:08:00 
SRC=196.x.x.x DST=10.50.18.22 LEN=52 TOS=0x00 PREC=0x00 TTL=117 ID=37995 
PROTO=TCP SPT=57952 DPT=80 WINDOW=65535 RES=0x00 ACK URGP=0

(This is logged by a -m state --state INVALID rule in the mangle table.) 
The packet is then not natted, but drops into the INPUT chain for the 
firewall itself, where it is dropped.

This seems to be the problem, as there are always one or more of these 
messages on a stalled connection.

Looking at /proc/net/ip_conntrack immediately after the above message is 
logged, I see:

tcp      6 295 ESTABLISHED src=196.x.x.x dst=10.50.18.22 sport=57952 
dport=80 packets=5 bytes=633 src=192.168.1.22 dst=196.x.x.x sport=80 
dport=57952 packets=12 bytes=13793 [ASSURED] mark=0 use=1

So the connection seems to be valid.

Any idea why this packet may be dropped, or are there other possible 
reasons why the connection may be stalling?

Googling reveals a significant number of people having problems with 
random stalls within a connection, but so far I have not seen a single 
answer to the problem.

Any help/advice will be greatly appreciated.

Thanks,

Justin


^ permalink raw reply	[flat|nested] 4+ messages in thread
* Connection tracking looses packets?
@ 2006-05-29  2:23 Mike Polek
  0 siblings, 0 replies; 4+ messages in thread
From: Mike Polek @ 2006-05-29  2:23 UTC (permalink / raw)
  To: netfilter

Hi,

For anyone interested, I was attempting to set up a load balancing
FTP server, which I've done before. I had a brand new kernel,
installed the nfct patches, etc. Not knowing that there had
been a tcp-window-tracking patch to the kernel, I couldn't figure
out why the first passive connection would always work, but
later passive connections would fail. After poking around, I could
see the (*pskb)->nfct pointer was NULL, and I was completely
stumped.

Thanks to Pascal Hambourg's post, I tried

echo 1 > /proc/sys/net/ipv4/netfilter/ip_conntrack_tcp_be_liberal

and magically, everything works perfectly, just like the old server.

I hope this helps others who are load balancing ftp servers.

Thanks to everyone who contributes to Open Source and these
mailing lists!!!

Mike Polek
Pictage, Inc.



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-05-29  2:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-24 13:25 Connection tracking looses packets? Justin Schoeman
2006-05-24 14:02 ` Sietse van Zanen
2006-05-26 12:19 ` Pascal Hambourg
  -- strict thread matches above, loose matches on Subject: below --
2006-05-29  2:23 Mike Polek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.