简体   繁体   中英

'Port Forward' a url

I am using a hosting service to have my minecraft server run. I was wondering if it was possible to "forward a port" to a url. ie: change 25561 to 25565 so that the minecraft client reads the url and the users don't have to put in the port of the website. A record: play.mydomain.tk 94.23.16.94

I want it so that when users put in the url on the minecraft client(which, if not defined, automatically selects port 25565) don't have to put in the custom port.

Not sure if there is a way to do this. I am aware Apache can use VHosts to host on the same server with the same port, but there must be some way to do this with other servers.

What you need is a SRV record to forward the minecraft 'service' to the right port on your hosting server. I'm doing this with mc.jgsw.me (which forwards to port 25569) and it took me flipping ages to work out.

If, as stated above, some other piece of software is already using port 25565 on your IP address, then it will be impossible to use that port on your Minecraft server without using a different IP address.

You could set up some sort of gateway that redirects traffic to server.example.com:25565 through to your server at xxxx:25561 and vice versa. This could be in the form of an SRV entry on a DNS server. You would need to own the domain to do this, but some domains can be very cheap. More info here from an SRV provider.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM