All of lore.kernel.org
 help / color / mirror / Atom feed
* How to use a random IP from a pool of static IPs for outgoing traffic
@ 2013-07-19  3:36 higkoohk
  2013-07-22  5:23 ` Vigneswaran R
  0 siblings, 1 reply; 3+ messages in thread
From: higkoohk @ 2013-07-19  3:36 UTC (permalink / raw)
  To: netfilter

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 ?

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to use a random IP from a pool of static IPs for outgoing traffic
  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
  0 siblings, 1 reply; 3+ messages in thread
From: Vigneswaran R @ 2013-07-22  5:23 UTC (permalink / raw)
  To: higkoohk; +Cc: netfilter

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

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: How to use a random IP from a pool of static IPs for outgoing traffic
  2013-07-22  5:23 ` Vigneswaran R
@ 2013-07-22 14:23   ` Nestor A. Diaz
  0 siblings, 0 replies; 3+ messages in thread
From: Nestor A. Diaz @ 2013-07-22 14:23 UTC (permalink / raw)
  Cc: netfilter

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
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-07-22 14:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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 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.