Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Charles Duffy <Charles_Duffy@messageone.com>
To: netfilter@vger.kernel.org
Subject: Re: NETMAP of destination *after* routing
Date: Thu, 07 Aug 2008 09:55:03 -0500	[thread overview]
Message-ID: <g7f2ch$tbm$1@ger.gmane.org> (raw)
In-Reply-To: <alpine.DEB.1.10.0808071340480.31237@mercury.sdinet.de>

Sven-Haegar Koch wrote:
> On Wed, 6 Aug 2008, Charles Duffy wrote:
> 
>> Unfortunately, the current behavior of NETMAP -- translating the source
>> address in POSTROUTING and the destination in PREROUTING -- doesn't appear to
>> work for this purpose: I still need the original destination intact when
>> routing to decide which bridge packets should go out.
>>
>>
>> How do 'yall suggest resolving this?
> 
> Perhaps setting a mark based on the destination address at pre-routing,
> use netmap, and then route based on the mark?
> (Using one routing table a'la 'common-dest/mask -> bridgeX' per mark)

This works only for packets which came in from elsewhere in the network; 
packets emitted from the local host don't go through PREROUTING (and 
thus can't be marked, and also -- and worse -- don't get their 
destinations translated).

Perhaps I could also also add a rule setting an appropriate mark in 
OUTPUT. Not being able to communicate with the hosts from the local 
system is a showstopper, however, and I'd prefer to avoid munging the 
routing tables if possible to keep the patch to libvirt implementing 
this functionality minimal. (Robust infrastructure is already in place 
for modifying iptables rules for libvirt-managed networks; routing, not 
so much).


  reply	other threads:[~2008-08-07 14:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06 22:57 NETMAP of destination *after* routing Charles Duffy
2008-08-06 23:13 ` Jan Engelhardt
2008-08-07 19:22   ` Charles Duffy
2008-08-07 11:43 ` Sven-Haegar Koch
2008-08-07 14:55   ` Charles Duffy [this message]
2008-08-07 15:16     ` Grant Taylor
2008-08-07 16:03       ` Jan Engelhardt
2008-08-07 19:35         ` 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='g7f2ch$tbm$1@ger.gmane.org' \
    --to=charles_duffy@messageone.com \
    --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