From: Marc Lehmann <schmorp@schmorp.de>
To: Patrick McHardy <kaber@trash.net>
Cc: Andrew Morton <akpm@osdl.org>,
netdev@vger.kernel.org,
Netfilter Development Mailinglist
<netfilter-devel@lists.netfilter.org>
Subject: Re: Fw: masquerading failure for at least icmp and tcp+sack on amd64
Date: Wed, 7 Sep 2005 22:59:23 +0200 [thread overview]
Message-ID: <20050907205923.GA6567@schmorp.de> (raw)
In-Reply-To: <431EDF78.8060505@trash.net>
On Wed, Sep 07, 2005 at 02:39:20PM +0200, Patrick McHardy <kaber@trash.net> wrote:
> Andrew Morton wrote:
Thanks for your response!
> > tcp 6 52 SYN_SENT src=10.0.0.1 dst=129.13.162.95 sport=44320
> > dport=80 [UNREPLIED] src=129.13.162.95 dst=84.56.237.68 sport=80
> > dport=44320 mark=0 use=1
>
> It seems ip_conntrack did not like the SYN/ACK and marked it as invalid,
> NAT leaves the packet alone and the firewall resets the connection.
> Please try if loading the ipt_LOG module and executing
> "echo 255 > /proc/sys/net/ipv4/netfilter/ip_conntrack_log_invalid"
> gives more information
I think I have the LOG target compiled into the kernel. After the echo, I got
this within a matter of seconds:
printk: 614 messages suppressed.
ip_ct_tcp: bad TCP checksum IN= OUT= SRC=xxxxxxxxxxxx DST=84.56.231.206 LEN=105 TOS=0x00 PREC=0x00 TTL=53 ID=33989 DF PROTO=TCP SPT=119 DPT=41349 SEQ=495763142 ACK=177548929 WINDOW=56677 RES=0x00 ACK PSH URGP=0 OPT (0101080A0986EF9D00E16123)
This is interesting, as the connection in question seems to work fine (at
least I can download news at 32kb/s, which is the rate limit on the other
side without much more than 32kb/s on my ppp link, so it is weird that
this many packets should have invalid tcp checksum. Maybe this is somehow
related?)
I then tried to create a masqueraded connection and got the expected
symptoms: correctly re-written packet leaves interface, return packet gets
RST.
During that time, I got more of the above messages, but none related to the
test connection.
I then stopped all traffic-generating programs to get an idle link and
retried. Still no log messages from the test conenction.
> >eth0:
> > 19:23:29.928470 IP 10.0.0.1.45611 > 129.13.162.95.80: S
> > 4113365634:4113365634(0) win 5840 <mss 1460>
> > 19:23:29.942246 IP 129.13.162.95.80 > 10.0.0.1.45611: S
> > 4161877683:4161877683(0) ack 4113365635 win 5840 <mss 1460>
> > 19:23:29.942313 IP 10.0.0.1.45611 > 129.13.162.95.80: . ack 1 win 5840
> >
> >inet:
> > 19:23:29.928249 IP 84.56.237.68.45611 > 129.13.162.95.80: S
> > 4113365634:4113365634(0) win 5840 <mss 1452>
> > 19:23:29.942199 IP 129.13.162.95.80 > 84.56.237.68.45611: S
> > 4161877683:4161877683(0) ack 4113365635 win 5840 <mss 1460>
> > 19:23:29.942332 IP 84.56.237.68.45611 > 129.13.162.95.80: . ack 1 win
> > 5840
> >
> >However, ICMP still is not masqueraded.
>
> Please also try this again with logging enabled.
No messages, either.
(As I wrote in another mail), I also found in the meantime that switching
off SACK only results in a correct handshake, further packets might and
usually will cause a RST.
> >Kernels that don't work:
> >
> > 2.6.13-rc7 (compiled with gcc-3.4 and 4.0.2 debian), 2.6.13 (gcc-4.02)
>
> Can you retest with 2.6.12.5 on 64bit so we can see if it is a new
> problem?
I hope that trying with 2.6.11, and getting the same problem (as I did in
the meantime), is even better than testing 2.6.12.5.
> So far I don't think its related to routed.
The weird thing is that it works on tap, but not on ethernet/ppp. Maybe
the kernel code gets some offset wrong?
--
The choice of a
-----==- _GNU_
----==-- _ generation Marc Lehmann
---==---(_)__ __ ____ __ pcg@goof.com
--==---/ / _ \/ // /\ \/ / http://schmorp.de/
-=====/_/_//_/\_,_/ /_/\_\ XX11-RIPE
next prev parent reply other threads:[~2005-09-07 20:59 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20050907052057.09714a4c.akpm@osdl.org>
2005-09-07 12:39 ` Fw: masquerading failure for at least icmp and tcp+sack on amd64 Patrick McHardy
2005-09-07 20:59 ` Marc Lehmann [this message]
2005-09-07 21:34 ` Patrick McHardy
2005-09-07 21:52 ` Marc Lehmann
2005-09-09 11:41 ` Patrick McHardy
2005-09-11 13:19 ` Marc Lehmann
2005-09-11 14:10 ` Patrick McHardy
2005-09-13 18:09 ` Stephen Hemminger
2005-09-13 20:59 ` David S. Miller
2005-09-14 1:13 ` Patrick McHardy
2005-09-14 3:41 ` David S. Miller
2005-09-14 1:10 ` Patrick McHardy
2005-09-14 19:09 ` Fw: " Marc Lehmann
2005-09-07 21:34 ` Marc Lehmann
2005-09-07 21:42 ` Patrick McHardy
2005-09-07 21:54 ` Marc Lehmann
2005-09-07 22:08 ` Patrick McHardy
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050907205923.GA6567@schmorp.de \
--to=schmorp@schmorp.de \
--cc=akpm@osdl.org \
--cc=kaber@trash.net \
--cc=netdev@vger.kernel.org \
--cc=netfilter-devel@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).