So I got a unmanaged centos server, I need to use one of my ips for our gaming server and a seperate one for our other gaming server. Can someone direct me in a way to do so? The reason I’m using two ips is because they run on the same port.
If you are hosting on the Internet, specify two different ports on the WAN side of your router, and forward those to the local IPs and ports on the LAN side.
You need to make sure you have the correct IP set up for each server. So you need to tell game server 1 to listen on IP X, and game server 2 to listen on IP Y. Normally you can set this up in a configuration file for the server, or as startup flag for the server, i.e.,
./my-game-server --listen 188.8.131.52
So you’d have to check which methods are used by the game in question.
Also be aware that a clean CentOS install usually blocks all incoming traffic on all ports except 22. You’d have to open up the port in iptables
sudo iptables -A INPUT -p TCP --dport <the-port> -j ACCEPT
where <the-port> is the port you want to open.
After you’ve done this, run
sudo service iptables save
To make sure the rule is still there after a reboot.