DNS SRV record redirect ip AND port

I’m running a web-panel on a linux box running some other servers and It’s port forwarded and open to the internet. Going to the public IP:8443 brings up the panel.

Since the domain I’m managing is pointing to a different webserver I made a subdomain and an A record that points to the IP address of the web-panel.
A lgsm IP-Address
Going to lgsm.my.domain:8443 brings up the panel and works properly.

The next step is to somehow utilize a SRV record to redirect not only the IP, but the port as well.
I tried making this SRV record to no avail:

_lgsm._tcp.lgsm. SRV 0 5 8443 lgsm.my.domain

Based on my research this should be right, but going to lgsm.my.domain without defining the port times out. It doesn’t work properly.

Strangely enough it does appear when using dig:

$ dig _lgsm._tcp.lgsm.chillservers.com srv +short
0 5 8443 lgsm.chillservers.com.

This should be possible right? Is there something wrong with my configuration? Could I get some assistance with this?

It’s definitely something with the SRV record because literally everything else in the chain works.

I ran an mxtoolbox DRV record test on the subdomain and go the following result:

An SRV record does not redirect any port, it only specifies it for clients which specifically support SRV records.

If the SRV record doesn’t redirect to a port, is there something that does?

Where do you want that to take place?

As I mentioned before, I’m running a web-panel on port 8443. I have a subdomain redirecting to the right ip, but nothing is telling the browser to connect to the right port unless the user defines the port by concatenating it to the end of the url: lgsm.chillservers.com:8443

I would like to somehow set up the dns records so that the subdomain not only defines the ip, but the port of which browser connect through.

I’m not entirely sure where exactly that would take place

DNS doesnt do that. Cant you simply change the port to 443?

In this instance, yes, but with other services that require different ports (like game-servers and the like) what do I do then? Other people are doing this somehow.

Some games do support SRV records. It all depends on the services you want to use.

Certain game clients first do a SRV lookup to see what port to connect to (eg. if you connect to example.com in minecraft, it first looks up _minecraft._tcp.example.com), but it depends on if the game supports that.

Also note that Cloudflare can’t proxy non-HTTP traffic, so if you set up a SRV record for a game client, it must point either directly to your server’s IP address, or to a grey clouded DNS record :grey:.

SRV records dont do IP addresses :slight_smile:

Thanks for the clarification. So I am configuring it correctly, but browsers/websites don’t support SRV records yeah? Also I knew enough not to run the record through the proxy, but it took a while to find out that this doesn’t work in this use-case.

Browsers dont, no. Again, it all depends on the services.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.