Linux Netfilter discussions
 help / color / mirror / Atom feed
From: "John A. Sullivan III" <jsullivan@opensourcedevelopmentcorp.com>
To: Tomek Macioszek <tomekm@cea.pl>
Cc: netfilter@lists.netfilter.org
Subject: Re: multiple mapping
Date: Wed, 01 Sep 2004 07:33:08 -0400	[thread overview]
Message-ID: <1094038388.2034.15.camel@localhost> (raw)
In-Reply-To: <007f01c49015$9544e610$2a245cc2@cea05>

On Wed, 2004-09-01 at 07:19, Tomek Macioszek wrote:
> Thanks for help. I have just only one question?
> If I make multiple mapping like this:
> iptables -t nat -A POSTROUTING -s 192.168.10.0/24 -o eth0 -j SNAT --to
> 4.3.2.0/24
> I should bind all this addresses (4.3.2.0/24) to eth0?
> ip address add 4.3.2.2/24 dev eth0
> ip address add 4.3.2.3/24 dev eth0
> ip address add 4.3.2.4/24 dev eth0
> ....
> ip address add 4.3.2.254/24 dev eth0
> Best regards
> T.
<snip>
If that is what you want to do, you will probably want to use the NETMAP
target from patch-o-matic.  The rule that you propose does not guarantee
a one-to-one mapping.  It does a round-robin mapping.  Thus there is no
guarantee that 192.168.10.5 maps to 4.3.2.5. In fact, it most likely
will not.

As far as I know, you will need to bind all of the addresses so that
they respond to the ARP requests.

This is where a tool like ISCS comes in handy
(http://iscs.sourceforge.net).  Not only does it automate the access
control configuration but it automates NAT and ARP.  You would simply
create a server with a private IP address of 192.168.10.1-192.168.10.254
and a public address of 4.3.2.1-4.3.2.254 and check the enforce
one-to-one box.  It would then create all the NAT rules, the address
bindings for ARP and distribute them to the gateway.  The project only
has pre-alpha releases thus far but we are moving quickly toward a full
release.  Good luck - John
-- 
John A. Sullivan III
Open Source Development Corporation
Financially sustainable open source development
http://www.opensourcedevel.com



  parent reply	other threads:[~2004-09-01 11:33 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-09-01  7:59 multiple mapping Tomek Macioszek
2004-09-01 11:07 ` John A. Sullivan III
     [not found]   ` <007f01c49015$9544e610$2a245cc2@cea05>
2004-09-01 11:33     ` John A. Sullivan III [this message]
2004-09-01 16:44 ` Jose Maria Lopez

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=1094038388.2034.15.camel@localhost \
    --to=jsullivan@opensourcedevelopmentcorp.com \
    --cc=netfilter@lists.netfilter.org \
    --cc=tomekm@cea.pl \
    /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