Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Francois Goudal <fg@satcom1.com>
To: Grant Taylor <gtaylor@riverviewtech.net>,
	Mail List - Netfilter <netfilter@vger.kernel.org>
Subject: Re: NAT issue on a machine with both routing and bridging.
Date: Tue, 24 Jun 2008 10:41:13 +0200	[thread overview]
Message-ID: <4860B329.7070000@satcom1.com> (raw)
In-Reply-To: <485FD267.2070604@riverviewtech.net>

Grant Taylor a écrit :
> On 06/23/08 11:00, Francois Goudal wrote:
>> Actually this might be the case. I'm running a standard debian etch 
>> kernel for the moment. I can consider building my own kernel, if 
>> necessary. What is the kernel option I shouldn't enable ?
> 
> The option that I'm referring to is "CONFIG_BRIDGE_NETFILTER".  This 
> option sets whether or not IPTables (layer 3 and above) sees bridged 
> (layer 2) traffic or not.
> 

Ok, I checked this, and it appears that in the standard Debian kernel I 
use, this is enabled. But still, my iptables are almost empty, there's 
just one single rule, for the masqueading, and I don't think this can 
have an impact on bridged packets, can it ?

> 
> I don't see any thing that (in theory) should not work.  The only thing 
> that comes to mind is to temporarily remove Host B (DomU) from the mix 
> and bridge br1 directly to eth1 and try your MASQUERADing between two 
> bridge interfaces.
> 

Okay, I did a quick test, by just removing eth1 from br0 and putting it 
in br1, but keeping the DomU, still.
So now, it looks like this :

................                                     ................
.    HOST A    .                                     .    HOST D    .
. 10.168.254.1 .                                     . 172.16.33.10 .
................                                     ................
   |                                                               |
   |                                                               |
   |                                                               |
   | eth1                                                     eth0 |
.....................................................................
. |0.0.0.0                                                0.0.0.0 | .
. |_____________________________________________  ________________| .
.                                               ||                  .
............................          _ br0     ||                  .
.                     eth0 . vif1.0  |  0.0.0.0 ||                  .
. XEN VM          _________._________|          ||                  .
. HOST B         | 0.0.0.0 . 0.0.0.0       _____||                  .
.                |         .              |      |_ br2             .
.           br0 _|         .              |      |  172.16.33.200   .
. 10.168.254.51  |    eth1 . vif1.1       |      |        ^         .
.                |_________._________ ____|               |         .
.                  0.0.0.0 . 0.0.0.0 |                    | Routing .
............................         |_ br1               | + DNAT  .
.                                    |  10.168.254.250 <--'         .
.                                    |                              .
.        HOST C                                                     .
.....................................................................

The VM is still here, but all the traffic from/to eth1 is not going 
through it, but reaches directly br1.
And actually, in this configuration, the packets from Host A to Host D 
are correctly masqueraded by Host C. Packets from Host B to Host D are 
still correctly masqueraded as well.

If I remove the VM completely, it works, also, but the previous test 
shows that the problem does not come from the presence of the VM, but 
the way all this is "connected".

> The only other thing that comes to mind is that you may be trying to nat 
> existing connections, which can not be done because only the first 
> packet in the connection passes through the NAT table.  But I don't 
> think this is likely.
> 

I'm doing my tests with ICMP Echo messages, for the moment, this is not 
something that has connection states, it must work, the tests with TCP 
traffic comes later, once this basic stuff will work.

Regards,

-- 
Francois Goudal
Satcom1


  reply	other threads:[~2008-06-24  8:41 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-23 14:22 NAT issue on a machine with both routing and bridging Francois Goudal
2008-06-23 15:02 ` Grant Taylor
2008-06-23 15:25   ` Francois Goudal
2008-06-23 15:48     ` Grant Taylor
2008-06-23 16:00       ` Francois Goudal
2008-06-23 16:42         ` Grant Taylor
2008-06-24  8:41           ` Francois Goudal [this message]
2008-06-24 14:29             ` Grant Taylor

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=4860B329.7070000@satcom1.com \
    --to=fg@satcom1.com \
    --cc=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