Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've been running a small game server for a while and want to set up a second one on the same server. The issue is that these servers don't support domain names; if a request comes in on the right port (22565)it doesn't matter what domain was being visited unlike say apache with its vhosts).

So my only option is to setup one game server on the default port (25565), and the other on another port (25564).

So to my question: is it possible to remap a port (in this case 25565 to 25564) if it comes in from a specific domain? (I have two subdomains both pointing to my server: mc, mcold; and would like to redirect all traffic sent to 25565 to 25564 if the user came from the subdomain mcold).

Thanks for any help,

share|improve this question
up vote 2 down vote accepted

tl;dr: No.

In order to do this sort of thing, the game client would need to support it, and it's highly unlikely that it does. In the case of web serving, the clients (a web browser) send the domain name along in the HTTP request as a host header. This way, the server knows which domain was used.

In the case of your game, however, this is not possible. The clients look up the domain name when they start up and then all subsequent access is via IP only.

Your best bet is to see if you can obtain an additional static IP address for the server.

share|improve this answer
Could you give a quick sentence how how to do it if I had a second IP? – Ben Aug 20 '12 at 19:34
One game server instance would listen on one IP and the other would listen on the other IP. One domain would point to one IP and the other would point to the other IP. – EEAA Aug 20 '12 at 19:36

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.