Subdomain configuration

Hello,

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)

#in /etc/config/dhcp

config domain                           
        option ip '192.168.1.xxx'            
        option name 'something.my_domain.com'

Not in an A record. And it depends on the service if a SVR record will work.

Can you provide the link from the software or manual that defines the SVR record required?

I've read about a similar problem with SRV records here.

I've also found the OpenWrt documentation about SRV, but I'm not sure it will work with Unbound.

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

What problem???

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.

My bad, I'm not familiar enough.

I was planning to use Mozilla Firefox to access them.

I"ve read a bit about SRV support in browsers, and it seems like they don't look for SRV records so this wouldn't work.

I'll try and find another solution.

Thank you @lleachii :slight_smile:

1 Like

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