04-16-2012, 02:55 AM
I'm moving a TF2 server to a new dedicated box. There is some overlap between the contracts of the old and new boxes.
Using iptables, I'm trying to redirect all TF2 traffic to old box at (1.1.1.1) to the new box (2.2.2.2).
The old box has multiple ips (1.1.1.1 - 1.1.1.5), and the TF2 server is running on 1.1.1.1:27015
On the old box net.ipv4.ip_forward is enabled, and the following rules have been set
But it doesn't seem to be working.
Can anyone spot the problem, have any advice or know of issues in doing this?
Using iptables, I'm trying to redirect all TF2 traffic to old box at (1.1.1.1) to the new box (2.2.2.2).
The old box has multiple ips (1.1.1.1 - 1.1.1.5), and the TF2 server is running on 1.1.1.1:27015
On the old box net.ipv4.ip_forward is enabled, and the following rules have been set
Code:
iptables -t nat -A PREROUTING -d 1.1.1.1 -p tcp --dport 27015 -j DNAT --to-destination 2.2.2.2:27015
iptables -t nat -A POSTROUTING -j MASQUERADE
But it doesn't seem to be working.
Can anyone spot the problem, have any advice or know of issues in doing this?