netfilter.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Kurt Wampler <Kurt.Wampler@brion.com>
To: netfilter@vger.kernel.org
Subject: How to achieve reverse NETMAP functionality?
Date: Fri, 18 Mar 2011 16:45:54 -0700	[thread overview]
Message-ID: <20110318164554.G20495@masktools.com> (raw)

We have a need to "alias" portions of a customer's internal private IP
network, because they have an address range which overlaps a private IP
address range used internally in one of our systems installed at their
site.  We are trying to avoid having to re-IP either network.

We would like to define a 1:1 NAT similar to what's implemented by the
iptables NETMAP target.  Currently, netmap can rewrite only the destination
address during prerouting, and it can rewrite only the source address
during postrouting.

In order to effectively alias the customer's network from the perspective
of our host, we want to rewrite the source address of packets coming from
the customer's network during prerouting, and rewrite the destination address
of the corresponding return packets during postrouting -- the opposite of
what netmap currently does.

Is there any way to achieve this by exploiting the existing configuration
capabilities in iptables?

Our host is running CentOS 5.3 with iptables 1.3.5.

Thanks in advance,

Kurt Wampler

             reply	other threads:[~2011-03-18 23:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-18 23:45 Kurt Wampler [this message]
2011-03-19  8:20 ` How to achieve reverse NETMAP functionality? Pandu Poluan
2011-03-20  8:20 ` Marek Kierdelewicz
2011-03-21 13:36 ` 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=20110318164554.G20495@masktools.com \
    --to=kurt.wampler@brion.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;
as well as URLs for NNTP newsgroup(s).