I was wondering if it is possible to configure OpenWrt to redirect requests made to a subdomain to a certain host.
For example, a request made to something.my_domain.com to be redirected to host_a. And if so, can ports also be mapped? For example another.my_domain.com to be redirected to host_a:port.
I've read that DNS records don't contain port information, so SRV records need to be used.
I use Unbound as a local DNS server, and I didn't manage to find how to configure it for SRV records (I have little experience in networking and I'm not even sure that Unbound is the one that needs to do the mapping / redirect)
Sadly I don't have the time to try it right now, but I'll try in the weekend and provide updates.
I'm trying to set up a FreeNas machine and I'm planning to use torrenting with Sonarr/Radarr. Since they are on the same host, it would be nice to be able to access them as sonarr.domain.com and radarr.domain.com rather than nas.domain.com:port1 and nas.domain.com:port2
I think you misunderstood my question, or you're not familiar enough with how SVR records work. Before someone can show how to create the record, we need to know what software is seeking a SVR record (e.g. VoIP server). You can't randomly create a SVR record and assume something will look it up.
If these services are running on different ports, that should be fine.