netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: netdev@vger.kernel.org,
	Kernel development list <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] SNAT sometimes allows packets to pass through unchanged
Date: Mon, 16 Feb 2009 17:25:55 +0100	[thread overview]
Message-ID: <49999393.3040105@trash.net> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0902161112360.15521-100000@netrider.rowland.org>

Alan Stern wrote:
> On Mon, 16 Feb 2009, Patrick McHardy wrote:
> 
>>> I tried adding a rule to log these unaccounted-for packets.  Nothing 
>>> showed up, even when I could see the packets being sent.
>> Where (table/chain/position) did you add this rule?
> 
> In the first position of the POSTROUTING chain in the nat table.  I
> don't remember exactly what rules I used, but at one point I tried
> something very much like this:
> 
> iptables -t nat -I POSTROUTING 1 -s 10.0.0.0/8 -p tcp ! --syn
> 
> The counter for this rule remained at 0 even after packets with private 
> source addresses were sent through the public interface.

The NAT table only sees the first packet of every connection
and never INVALID packets. The mangle table should work fine.

You can also enable conntrack-internal logging of invalid packets:

echo 255 >/proc/sys/net/netfilter/nf_conntrack_log_invalid

>> Sorry, there were quite a few patches and I don't remember which
>> ones exactly are related.
> 
> I tried using 2 6.27 kernel but the problem remained.  Building a later 
> version won't be easy because of the need to create the proper config.  
> Can you remember in which version these bugs got fixed?

Sorry, no.

  reply	other threads:[~2009-02-16 16:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-02-11 17:37 [BUG] SNAT sometimes allows packets to pass through unchanged Alan Stern
2009-02-12  5:18 ` Patrick McHardy
2009-02-12 15:11   ` Alan Stern
2009-02-16 10:43     ` Patrick McHardy
2009-02-16 16:19       ` Alan Stern
2009-02-16 16:25         ` Patrick McHardy [this message]
2009-02-16 16:41           ` Alan Stern
2009-02-18 16:49           ` Alan Stern
2009-02-18 16:58             ` Patrick McHardy
2009-02-18 17:41               ` Alan Stern

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=49999393.3040105@trash.net \
    --to=kaber@trash.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /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).