Minecraft and other gaming servers

I am trying to host a Minecraft server through a tunnel and without port forwarding. It’s not practical for my friends to also download Cloudflare and connect a tunnel for each one because other people I do not know closely(friend of a friend) could be joining the server. Is there any way that I can point an SVR record at a cname instead of an A name record? and I am running the server through unraid dockers and currently have it setup through port forwarding, but I am moving and will no longer have access to port forwarding. Any help would be appreciated

The official RFC for SRV records RFC 2782 says:

The domain name of the target host. There MUST be one or more address records for this name, the name MUST NOT be an alias (in the sense of RFC 1034 or RFC 2181).

It might work is clients are (usually) smart enough to resolve the CNAME but not guaranteed

TBH, this isn’t a good use of cloudflared IMO even if you could get it to work. There’s no real benefit in routing the traffic through Cloudflare.

There are several common setups I see:

  1. Having all clients get on some kind of ‘simple’ (to end users at least) VPN style tech such as Tailscale, ZeroTier etc.

  2. Connect your server to an intermediate host on which you can control access and route the traffic back.

As you’re saying your friends prob wouldn’t use cloudflared then they’re likely not going to want to install anything for topology (1).

As for topology (2) I’ve seen a lot of people use cheap VPSes and a WireGuard site-to-site link to connect their home server to it, then forward the traffic using wither iptables or an nginx stream proxy config. There’s even scripts on github which automate much of this setup and if you’re strapped for cash you can get a free Oracle Cloud Instance that’ll work just fine for this (ARM have gigabit throughput).

Getting back on topic, SRV records will naturally then point to the VPS public IP and be RFC compliant.

1 Like