Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Pascal Hambourg <pascal.mail@plouf.fr.eu.org>
To: "netfilter@vger.kernel.org" <netfilter@vger.kernel.org>
Subject: Re: Multiple --to-source not supported
Date: Sat, 26 Sep 2009 13:06:05 +0200	[thread overview]
Message-ID: <4ABDF59D.1010706@plouf.fr.eu.org> (raw)
In-Reply-To: <B7A55E8C969B974FBC89274E565B8B2D019DFBCA0A@US-COL-EXCHMBX1.green.sophos>

Hello,

Dave Sparks a écrit :
> I am trying to setup SNAT for a large network to roundrobin over two
> different /28s which are on the same interface.  The obvious way to do
> this with iptables doesn't like the dis-contiguous cidrs and complains:
> 
> /sbin/iptables -t nat -A eth1_masq -s 10.0.0.0/24 -d 0.0.0.0/0
> -j SNAT --to-source 1.2.3.210-1.2.3.222 --to-source 4.5.6.50-4.5.6.62
> 
> iptables v1.4.3.2: Multiple --to-source not supported
> 
> This used to work in earlier 2.6 kernels, why doesn't it work anymore?
> Any tips for workarounds?

Support for multiple ranges was removed in kernel 2.6.11 and above.

ChangeLog-2.6.11 says :
  [PATCH] Remove NAT to multiple ranges
  The NAT code has the concept of multiple ranges: you can say "map this
  connection onto IP 192.168.1.2 - 192.168.1.4, 192.168.1.7 ports
  1024-65535, and 192.168.1.10".  I implemented this because we could.

  But it's not actually *used* by many (any?) people, and you can
  approximate this by a random match (from patch-o-matic) if you really
  want to.  It adds complexity to the code.

The "random" match from the patch-o-matic was superseded by the
"statistic" match which was added in mainline kernel 2.6.18 and iptables
1.3.6.

  reply	other threads:[~2009-09-26 11:06 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-25 22:57 Multiple --to-source not supported Dave Sparks
2009-09-26 11:06 ` Pascal Hambourg [this message]
2009-09-29  1:40 ` Cannot access to CVS server of Patch-O-Matic Nguyen Anh Dung
2009-09-29  9:22   ` Saikiran Madugula

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=4ABDF59D.1010706@plouf.fr.eu.org \
    --to=pascal.mail@plouf.fr.eu.org \
    --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