I currently have these rules:
iptables -A PREROUTING -t nat -p udp -i eth0 -d 168.120.50.119 --dport 8080 -m statistic --mode random --probability 0.33 -j DNAT --to-destination 167.120.10.131:8080
iptables -A PREROUTING -t nat -p udp -i eth0 -d 168.120.50.119 --dport 8080 -m statistic --mode random --probability 0.33 -j DNAT --to-destination 167.120.10.132:8080
iptables -A PREROUTING -t nat -p udp -i eth0 -d 168.120.50.119 --dport 8080 -m statistic --mode random --probability 0.33 -j DNAT --to-destination 167.120.10.133:8080
Now I would like to know how I can handle those packages to send them to another address again.
I had tried with this:
iptables -t nat -I POSTROUTING -p udp -s 167.120.10.131 --sport 8080 -j SNAT --to 72.32.229.66:7777
iptables -t nat -I POSTROUTING -p udp -s 167.120.10.132 --sport 8080 -j SNAT --to 72.32.229.66:7777
iptables -t nat -I POSTROUTING -p udp -s 167.120.10.133 --sport 8080 -j SNAT --to 72.32.229.66:7777
Unfortunately, it did not work.
72.32.229.66
it would be the IP over which the service is running.
NOTE: All the ip's are in the same dedicated, and the same network card.
How could I do it?