Created
November 29, 2014 09:13
-
-
Save gcoda/7e7444aa6bf339079c58 to your computer and use it in GitHub Desktop.
How i migrated my TS3 server to new host
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# i run this on my current TS3 server to redirect connections on new host | |
# --to might be changed to --to-destination | |
# %%DESRINATION.IP%% is ip address of my new VDS | |
iptables -t nat -A PREROUTING -p tcp --dport 9987 -j DNAT --to %%DESRINATION.IP%%:9987 | |
iptables -A FORWARD -d %%DESRINATION.IP%% -p tcp --dport 9987 -j ACCEPT | |
# and for UDP, not sure if TCP port even matter for TS3 | |
iptables -t nat -A PREROUTING -p udp --dport 9987 -j DNAT --to %%DESRINATION.IP%%:9987 | |
iptables -A FORWARD -d %%DESRINATION.IP%% -p udp --dport 9987 -j ACCEPT | |
iptables -t nat -A POSTROUTING -j MASQUERADE | |
sysctl net.ipv4.ip_forward=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment