1

I have multiple services running that I'd like to access through one port. To make something like this work, I have a proxy server running that can redirect clients based on the url they connect with. For example, a client connecting with service1.mydomain.com would get redirected to service 1, and someone else connecting with service2.mydomain.com would get redirected to service 2. I want to do this so I only have to forward one port (for security, and for ease of adding/removing services).

Right now, I have an SRV record that points to this service (a subdomain, and I've verified that it works). Ideally, I'd like to add CNAME records that point to this SRV record for any and all services running behind the proxy. In other words, if this ip:port of this service changes, I'd like to only change one record since they all use the same ip:port. Is this possible?

My first thought is to make the CNAME point to the full domain name of your SRV record i.e. _Service._Proto.name.mydomain.com. But I haven't been able to verify this yet... I'm also curious to see if there is a better way to go about this. Thanks in advance.

EDIT: These are not web services. I know browsers can't understand SRV records (and aren't supposed to). I have a client application that understands getting the port number from the record. I have verified that it works on that basis.