Running a Minecraft server on alternate port using a SRV Record

We have multiple Minecraft servers running behind the same IPV4 address and they can not share the default port.

So instead of having to type in the aternative port each time you add the Minecraft server, you can instead add a DNS SRV record with the alternate port.

Here is the one we created

dig _minecraft._tcp.mc2.lamerschool.com srv

_minecraft._tcp.mc2.lamerschool.com. 243 IN SRV 0 5 25567 mc2.lamerschool.com.

You can use nslookup on Windows

nslookup
# press enter
set query=srv
_minecraft._tcp.mc2.lamerschool.com
quit

or host on Linux if you prefer

host -t SRV _minecraft._tcp.mc2.lamerschool.com

So when you connect to mc2.lamerschool.com it will query that SRV record and connect to alternative port 25567 instead automagically.

We are currently using the Swedish company Loopia as the DNS provider for lamerschool.com.

Here is how you add a SRV record in their Portal

Swedish language

  1. Login to the Portal
  2. Click on the domain under ‘Domännamn’
  3. Click ‘DNS-editor’
  4. Click on ‘Lägg till subdomän’
  5. Add the hostname part, in this case _minecraft._tcp.mc2
  6. Change the ‘Typ’ (type) to SRV
  7. Set TTL to the same as the domain, in our case 300 (seconds, or 5 minutes)
  8. Add the data 0 5 25567 mc2.lamerschool.com

The data is comprised of priority, weight, port and the target (AAAA or A record), in this case mc2.lamerschool.com.

Here is the data to enter

  • Subdomän: _minecraft._tcp.mc2
  • Typ: SRV
  • TTL: 300
  • Data: 0 5 25567 mc2.lamerschool.com.

References

Wikipedia SRV Record


Make sure to always keep your Operating System(s) and all of the software that you are using up to date.

Feedback on our content or did you find a bug somewhere?

Send us an email to feedback at this domain.

kthxbai