SRCDS Steam group


Moving servers - iptables - ip masquerading
#1
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

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?
Reply
#2
After realising that I'd overlooked UDP, I added a rule for that, and it appears to be working. Not sure if there are issues with doing this though.
Reply
#3
You mind posting the entire iptables-rules? Could be useful for others with the same problem Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)