Unbound DNS Override for Specific Subdomain – Alternative Solutions?

Started by paul_, February 02, 2025, 06:21:09 PM

Previous topic - Next topic
Hi everyone,

I'd like to briefly explain my setup: I'm running an internal reverse proxy, and I use Unbound to resolve all DNS queries for *.mydomain.net via host overrides, forwarding them to my Nginx proxy. Now, I'd like to forward only a specific subdomain, e.g., sub1.mydomain.net, to a different IP, while all other subdomains (e.g., sub2.mydomain.net) should resolve to the default wildcard DNS IP.

Unfortunately, I haven't been able to achieve this with Unbound. Does anyone have an idea how to implement this? If switching to another DNS plugin is necessary, that's not a problem—my main requirement is that I can use upstream DNS servers via DoT or DoH.

Any suggestions would be greatly appreciated!

Thanks in advance and BR
Paul

Query forwarding does not do what you intend?
Deciso DEC750
People who think they know everything are a great annoyance to those of us who do. (Isaac Asimov)

No, I´m afraid not...It can just forward to a DNS-Server if i got that right and I only have nginx running where i need this *.mydomain.net to point to and sub1.mydomain.net should point to another nginx server with another ip...

This is an interesting thread and I am trying to do something similar. Keen to see what is possible and how...

I currently have a reverse proxy running on 2 servers (that host end-user services) on my LAN (homelab) and use duckdns with wildcard for two domains make it all work.

I'd like to be able to get it all to work using just one reverse proxy but I haven't found a way (yet)

A bit dirty but:
- change unbound zone mode to transparent
- add specific subdomains to unbound
- enable dnsmasq with another port then 53
- forward domain to dnsmasq
- add wildcard to dnsmasq

That's what coming in my mind right now