#!/bin/bash
iptables -F INPUT
iptables -F OUTPUT
iptables -F FORWARD
iptables -t nat -F PREROUTING -t nat
iptables -t nat -F POSTROUTING -t nat
iptables -A PREROUTING -t nat -d 210.5.46.28 -p udp --dport 53 -j DNAT --to 210.5.47.28
iptables -A PREROUTING -t nat -d 210.5.46.28 -p tcp -m multiport --dport 3306,80,443,110,2525,25,20,21,143,2222 -j DNAT --to 210.5.47.28
iptables -A POSTROUTING -t nat -d 210.5.47.28 -j SNAT --to 210.5.46.28