NAT rules in play:
Code: Select all
iptables -t nat -A PREROUTING -p udp -d 104.255.169.247 --dport 34197 -j REDIRECT --to-port 35001
iptables -t nat -A POSTROUTING -p udp -s localhost --sport 35001 -j SNAT --to-source 104.255.169.247:34197
iptables -t nat -A POSTROUTING -p udp -s 104.255.169.246 --sport 35001 -j SNAT --to-source 104.255.169.247:34197
iptables -t nat -A PREROUTING -p udp -d 104.255.169.246 --dport 34197 -j REDIRECT --to-port 35000
iptables -t nat -A POSTROUTING -p udp -s localhost --sport 35000 -j SNAT --to-source 104.255.169.246:34197
iptables -t nat -A POSTROUTING -p udp -s 104.255.169.246 --sport 35000 -j SNAT --to-source 104.255.169.246:34197