From: "Nestor A. Diaz" <nestor@tiendalinux.com>
Cc: netfilter@vger.kernel.org
Subject: Re: How to use a random IP from a pool of static IPs for outgoing traffic
Date: Mon, 22 Jul 2013 09:23:44 -0500 [thread overview]
Message-ID: <51ED4070.1090005@tiendalinux.com> (raw)
In-Reply-To: <51ECC1B5.8090206@atc.tcs.com>
Haven't you look at the statistic module with the ramdom
<http://ipset.netfilter.org/iptables-extensions.man.html> option ? I
*suppose* that should work, see mylast post
<http://www.spinics.net/lists/netfilter/msg54527.html> about load
balancing incoming traffic as that will give you some idea, just change
prerouting with postrouting, DNAT with SNAT, nth with random, and
instead of port just specify the outgoing ip address, just take in mind
it would work for an ip address pool attached to one interface, if you
want to do that with multiple (ip interfaces / ip address pools) you
would have to deal with 'ip' commands.
Slds.
--
Typed on my key64.org keyboard
Nestor A Diaz
On 07/22/2013 12:23 AM, Vigneswaran R wrote:
> On 07/19/2013 09:06 AM, higkoohk wrote:
>> I have a linux server , use iptables as nat router.
>>
>> This server has many public static IPs , but the machines in LAN
>> always use the default public ip as route.
>>
>> We need random use out going IPs .
>>
>> Anybody know howto with iptables ?
>
> Specifying the public IP range in SNAT may help,
>
> --to-source [ipaddr-ipaddr]
>
>
> Regards,
> Vignesh
> --
> To unsubscribe from this list: send the line "unsubscribe netfilter" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
prev parent reply other threads:[~2013-07-22 14:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-07-19 3:36 How to use a random IP from a pool of static IPs for outgoing traffic higkoohk
2013-07-22 5:23 ` Vigneswaran R
2013-07-22 14:23 ` Nestor A. Diaz [this message]
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=51ED4070.1090005@tiendalinux.com \
--to=nestor@tiendalinux.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