06-19-2011, 05:35 PM
First off, I have looked through the forums here and seen a few posts here and there regarding the issue, but none of them have seemed to work for me.
The situation I'm looking at is that we have some fairly high traffic servers currently, and are looking to move them to a new datacenter onto some better hardware. In order to make the transition as smooth as possible, I'd like to find a way to have people be able to connect from the old ip (IP1) and forward the packets using iptables to the server hosted on the new ip (IP2).
I've been looking around, and came up with something like this:
iptables -t nat -A PREROUTING -p udp -d 174.36.231.17 --dport 27015 -j DNAT --to-destination 64.31.26.101:27015
However this doesn't seem to work. Is there something I'm missing here?
To clarify, the servers are in two different datacenters.
The situation I'm looking at is that we have some fairly high traffic servers currently, and are looking to move them to a new datacenter onto some better hardware. In order to make the transition as smooth as possible, I'd like to find a way to have people be able to connect from the old ip (IP1) and forward the packets using iptables to the server hosted on the new ip (IP2).
I've been looking around, and came up with something like this:
iptables -t nat -A PREROUTING -p udp -d 174.36.231.17 --dport 27015 -j DNAT --to-destination 64.31.26.101:27015
However this doesn't seem to work. Is there something I'm missing here?
To clarify, the servers are in two different datacenters.