On Thursday 2008-07-10 07:13, Josh Cepek wrote: > > With the statistic match you can create a round-robin that targets each rule in > turn. To do what you seek above you could use this series of rules, with your > own additional matches added as required: > iptables -A PREROUTING -t nat -m statistic --mode nth --every 2 -j DNAT > 10.0.0.101-102 > iptables -A PREROUTING -t nat -j DNAT 10.0.0.104-105 > > This is conceptually the same (but simpler than) the following series of rules: > iptables -A PREROUTING -t nat -m statistic --mode nth --every 4 -j DNAT > 10.0.0.101 > iptables -A PREROUTING -t nat -m statistic --mode nth --every 3 -j DNAT > 10.0.0.102 > iptables -A PREROUTING -t nat -m statistic --mode nth --every 2 -j DNAT > 10.0.0.104 > iptables -A PREROUTING -t nat -j DNAT 10.0.0.105 It is not conceptually the same. NAT will try to use the same address pair (in this case, destination IP) for the same source address, in fact creating a not-so-round-robin. Splitting it up into multiple DNAT rules makes it a true round-robin. -- To unsubscribe from this list: send the line "unsubscribe netfilter" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html