Portforwarding through DNS??

So, a simple portforwarding that happens on DNS server instead of a reverse proxy :D you need to add a DNS record on your DNS control-panel.

For my instance i use traefik, which at the moment does not support the protocol needed properly to forward minecraft sessions.

By adding a "A" record and "SRV" record on your DNS host we can redirect any subdomain to any port without exposing the port when entering the server name. Easier to remember and all. The records needs ot look like this

A Record

SUBDOMAIN.maindomain.tld <IP>

SRV Record

Service: _minecraft
Protocol: _tcp.SUBDOMAIN
Priority: 0
Weight: 5
Port: [The Port you want]
Target: [your domain with the subdomain, just like in A record]
TTL: Automatic or 3600

Wait for it to propagate and test.

Notice: As i have another DNS supplier, the sceheme might be different. You might need to write down much of the configuration in a single line like me. I choose, type "SRV", TTL and DATA. Data can look like this.

<priority> <wight> <port> <target>