Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Grant Taylor <gtaylor@riverviewtech.net>
To: Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: DNAT routing problem
Date: Fri, 09 May 2008 09:20:59 -0500	[thread overview]
Message-ID: <48245DCB.6060905@riverviewtech.net> (raw)
In-Reply-To: <3598a5460805090630m2676a18dp9f25e7ca9efb9ca9@mail.gmail.com>

On 05/09/08 08:30, Andrea Ranieri wrote:
> My previous tests involved a ipv4 flow going always from 10.0.5.2 to 
> 10.0.6.2, and the results remains those I wrote in my first mail. Now 
> I tried to change the source IP, and finally, the natting process 
> begins. But obiviously with a strange behavior...

(See below.)

> In this test I always have the 10.0.5.2->10.0.6.2 flow running, and a 
> 10.0.5.[2 to 5]->10.0.6.2 flow. Every IP except the .2 get natted. 
> The .2 remains unchanged. Moreover, when i flush the nat table, the 
> rule disappear but .3, .4 and .5 IPs continue to get natted. I think 
> that's a cache problem.

This really makes me believe that you are dealing with what connection 
tracking thinks is an on going existing established flow / connection. 
Remember that the NAT table only sees the first packet of a connection. 
  So if you are altering your NAT table after a connection is 
established it will name make any difference to the existing connection. 
  This is further exemplified by you testing .3-.5 and seeing them start 
to change and then continue doing what they were when you flush your NAT 
table.  I think you will find that if you stop your connections, wait a 
few minutes, and then start them back up they will behave as expected.

> It's time to put feet in the mouth, isn't it? ^___^

Na.  ;)



Grant. . . .

  reply	other threads:[~2008-05-09 14:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-08 18:17 DNAT routing problem Andrea Ranieri
2008-05-08 19:37 ` Grant Taylor
2008-05-09 10:48 ` Andrea Ranieri
2008-05-09 13:04   ` Cloves Pereira Costa Jr
2008-05-09 13:30   ` Andrea Ranieri
2008-05-09 14:20     ` Grant Taylor [this message]
2008-05-09 16:34     ` Andrea Ranieri
2008-05-09 17:55       ` Grant Taylor
2008-05-10  8:56       ` Jan Engelhardt
2008-05-12 16:40         ` Andrea Ranieri
2008-05-10  8:52   ` Jan Engelhardt

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=48245DCB.6060905@riverviewtech.net \
    --to=gtaylor@riverviewtech.net \
    --cc=netfilter@vger.kernel.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