All of lore.kernel.org
 help / color / mirror / Atom feed
From: Phil Oester <kernel@linuxace.com>
To: Igor S <nat4592@scarlet.be>
Cc: netfilter@vger.kernel.org
Subject: Re: SNAT range does not use unique IP
Date: Thu, 12 Dec 2013 14:34:44 -0800	[thread overview]
Message-ID: <20131212223443.GA2211@home> (raw)
In-Reply-To: <e7ab2e194832d5b3253cf7d6cdde9f63@scarlet.be>

On Thu, Dec 12, 2013 at 10:55:53PM +0100, Igor S wrote:
> Dear netfilter guru's
> 
> I am trying to build a kind of a dynamic 1:1 SNAT gateway that is
> supposed to build every incoming IP to a unique internal IP in the
> internal network without any port mangling.

Then you should be using the NETMAP target.

   NETMAP (IPv4-specific)
       This target allows you to statically map a whole network of addresses onto another network of addresses.   It  can
       only be used from rules in the nat table.

       --to address[/mask]
              Network  address to map to.  The resulting address will be constructed in the following way: All 'one' bits
              in the mask are filled in from the new `address'.  All bits that are zero in the mask are  filled  in  from
              the original address.


Phil

  reply	other threads:[~2013-12-12 22:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-12 21:55 SNAT range does not use unique IP Igor S
2013-12-12 22:34 ` Phil Oester [this message]
2013-12-13 14:34   ` Igor S
2013-12-13 17:21     ` Phil Oester
2013-12-16  8:17       ` Igor S
2013-12-16  9:23         ` Pascal Hambourg
2013-12-17 11:05           ` Igor S
2013-12-17 11:07           ` Igor S

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=20131212223443.GA2211@home \
    --to=kernel@linuxace.com \
    --cc=nat4592@scarlet.be \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.