Hello!
I have 2 teamspeak3 servers on two different VPS.
Let's assume that the first one has the address 10.10.10.10 and the second 20.20.20.20 and both operate on port 9987.
I am trying to make a redirect so that anyone who will come on 10.10.10.10:9987 hit at 20.20.20.20:9987
I definitely want to do it using iptables, I don't want to use modalquit option in the information in the ts application.

I tried to do something like that and it does not work (on the server 10.10.10.10:9987)
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p udp -i eth0 --dport 9987 -j DNAT --to-destination 20.20.20.20:9987
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
What is very interesting, how they do it on another port it works. E.g
Code:
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -t nat -A PREROUTING -p udp -i eth0 --dport  -j DNAT --to-destination 20.20.20.20:9987
iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE
I am using 10.10.10.10:10000 and redirects me to 20.20.20.20:9987 but i want 10.10.10.10:9987 -> 20.20.20.20:9987

Thanks for all the help and sorry for my English