All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carl-Daniel Hailfinger <c-d.hailfinger.devel.2005@gmx.net>
To: Netfilter Development Mailinglist <netfilter-devel@lists.netfilter.org>
Subject: SNAT from multiple interfaces with the same IP?
Date: Sun, 04 Dec 2005 13:30:00 +0100	[thread overview]
Message-ID: <4392E148.7010102@gmx.net> (raw)

Hi,

some time ago, I read that netfilter is unable to perform SNAT
for identical ranges on different interfaces.

Scenario:

eth0: 192.168.0.1/16
eth1: 192.168.0.1/16
eth2: 10.2.0.1/8

iptables -t nat -A POSTROUTING -i eth0 -s 192.168.0.0/16 -j SNAT --to-source 10.0.0.0-10.0.255.255
iptables -t nat -A POSTROUTING -i eth1 -s 192.168.0.0/16 -j SNAT --to-source 10.1.0.0-10.1.255.255

Will that work or is connection tracking unable to differentiate
between the 192.168/16 subnets on eth0 and eth1? My problem is
that although the ranges on eth0 and eth1 are sparsely populated,
some IPs exist in both networks. Communication between the networks
on eth0 and eth1 is not necessary, I just want them to be able to
communicate with the outside (on eth2).

If this is not possible, is there a patch in POM or something else
with which I can achieve my goal with only one machine.


Regards,
Carl-Daniel

             reply	other threads:[~2005-12-04 12:30 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-04 12:30 Carl-Daniel Hailfinger [this message]
2005-12-04 15:31 ` SNAT from multiple interfaces with the same IP? Patrick McHardy
2005-12-04 15:37   ` Herve Eychenne
2005-12-04 16:02     ` Patrick McHardy
2005-12-04 23:35       ` Herve Eychenne
2005-12-04 23:41         ` 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=4392E148.7010102@gmx.net \
    --to=c-d.hailfinger.devel.2005@gmx.net \
    --cc=netfilter-devel@lists.netfilter.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.