#SRV Multiple Port Binds [ One A Record ] - DNS

39 messages · Page 1 of 1 (latest)

open pier
#

Hello!

I have bound multiple SRV records to specific ports leading to a single A record sub-domain.
Depending on which service is actually running at the time, my client application reports connecting to the wrong port, when not specified in the Server Address manually.

My question:```yaml
What is the proper setup for different services to be hosted on alternate ports under the same target (sub)domain, to resolve to whichever service is currently running?

nimble totem
#

A reverse proxy typically would be. If you're using SRV records make sure your application supports them.

open pier
#

The records lead to the different services fine.

#

I shall format my prior post a little nicer.

#

I am wondering if the issue is the client or the server.

nimble totem
#

Are the SRV records for different applications? Or are you talking about load balancing/failover?

open pier
#

All minecraft servers of differing installations.

#

One Node.

#

Each server binds to the same IP, under a different port.

#

SRV record for each port (same every other argument) is assigned to a single (sub)domain.

nimble totem
#

I don't know if you can do failover with just SRV records, there doesn't seem like a way to determine which record goes through is implemented there.

open pier
#

I think context with visuals would help more...

#

These are the Allocations.

#

They all have the same IP

nimble totem
#

I don't think what you're trying to do is possible with SRV records. You could use different subdomains.

#

They each need their own target. There is no method being implemented here to determine where traffic goes. You have one record telling it to go one place, then another record telling it to go another place, etc.

frigid lake
#

you realize what you've done is make round robin dns for IN SRV _minecraft._tcp.domain.com

open pier
#

Would this work?

#

Use a different "Name" for each?

frigid lake
#

yes

open pier
#

EWrrr.

#

I have those mixed up.

#

And thank you.

sand token
# open pier

Is this for hiding real ip or just load balancing?

open pier
#

It's to allow me to only have to turn a server off or on depending on the desire.

#

:X

open pier
#

Oh having a domain?

sand token
# open pier Oh having a domain?

Yes like if someone do ping on your domain, its not even real ip like if u re using cloudflare, so when someone ping, only got cloudflare ip

open pier
#

Is it possible to make it so I only have to use mc.zethal.games?

frigid lake
#

SRV records cannot be proxied

open pier
#

Yeah and Cloudflare only proxies HTTP/S

frigid lake
#

so when you do dig _minecraft._tcp.domain.com you get the srv target record, which gets looked up (unproxied) to IP [unless you have enterprise with spectrum addon]

nimble totem
#

And Cloudflare shows you a big warning at the top of your DNS page letting you know the SRV record means your backend is exposed.

open pier
#

Hm

#

So I guess this is where I say thank you for pointing out my question?