I have 2 Minecraft servers running on the same IP Address. One is running on port 25565 and the other on port 25566. I also have 2 domains, for example, let's just say domain1.com and domain2.com. I want domain1.com to point to the server that's running on port 25565, and I want the domain2.com to point to the server that's running on port 25566. I want to have it so that the client does not need to type in the port number by doing domain2.com:25566. I heard there's a way to do this with SRV Records, but I just can't seem to figure out how to do it. (I am using Dynadot for my domains by the way)
Asked
Active
Viewed 2,051 times
1 Answers
0
You can also do this without too much DNS record changing. Minecraft is sending the hostname (what address the user has typed in) with the first connection packet. You can use an intermediate server (proxy) that just analyses the first packet and then routes all following packages to the correct minecraft server based on the hostname.
There is already such a project on GitHub that you can use: https://github.com/RenegadeEagle/minecraft-redirect-proxy
So what you would do is:
- Point both domains to your Servers IP
- Install the proxy on your server (listening on port 25565)
- Change your servers so that they run on (for example) port 25566 and 25567
- Configure the proxy to reflect your desired domains
- Start all application and you should be ready to go
This is how I would setup the proxy (But I haven't tested that!)
{
"versionName": "ProxyCup",
"maxPlayers": 0,
"onlinePlayers": 0,
"motd": "Couldnt connect to requested backend server. If you believe this to be an issue, contact the administrator of this proxy.",
"port": 25565,
"nodes": [
{
"hostname": "domain1.com",
"remoteHostname": "localhost",
"remoteHostPort": 25566
},
{
"hostname": "domain2.com",
"remoteHostname": "localhost",
"remoteHostPort": 25567
}
]
}
Ohjurot
- 1
- 2