1*de922be4SDavid Wang# iptables -t nat -N myservice 2*de922be4SDavid Wang# iptables -t nat -A myservice -m statistic --mode random --probability 0.3333 -j DNAT --to-destination 172.18.1.3 3*de922be4SDavid Wang# iptables -t nat -A myservice -m statistic --mode random --probability 0.5 -j DNAT --to-destination 172.18.1.4 4*de922be4SDavid Wang# iptables -t nat -A myservice -j DNAT --to-destination 172.18.1.5 5*de922be4SDavid Wang 6*de922be4SDavid Wang 7*de922be4SDavid Wang 8*de922be4SDavid Wang# iptables -t nat -A OUTPUT -d 10.10.0.0/16 -j myservice 9*de922be4SDavid Wang 10*de922be4SDavid Wangfor a in range(1, 101): 11*de922be4SDavid Wang for b in range(1, 101): 12*de922be4SDavid Wang print "iptables -t nat -A services -d 10.10.%d.%d/32 -j myservice" % (a, b) 13*de922be4SDavid Wang 14