Is there a way of having only a certain subdomain access a port?
Let's say I have a Minecraft server running on default port 25565. I also have domain.com which is pointed to the IP of the server, because I also host a website with apache2 on it. mc.domain.com is set up as a subdomain. If I put domain.com into the Minecraft client, it will connect to the minecraft server. If I put mc.domain.com into the Minecraft client, it will also connect to the minecraft server.
Can I make it so that only mc.domain.com will connect, and that if a user enters domain.com or any other subdomain into Minecraft, it won't connect to the server?