Unbound DNS Guidance

Started by baqwas, April 29, 2025, 01:59:42 PM

Previous topic - Next topic
Hello!

I would like to "register" a few virtual hosts. I need some guidance, please.

I'm using DHCP and Unbound under OPNsense. I have a server registered as server1.domain.org under DHCP. How can I leverage Unbound to register site1.server1.domain.org, site2.server1.domain.org, etc.? The virtual hosts may or may not use different port numbers under Apache2 virtual host control.

It is my understanding that if Unbound can resolve server1.domain.org, then I should be able to add the virtual hosts using Unbound (apart from the work needed under Apache2). Any advice would be appreciated. Thanks.

Regards.

P.S.
I was using another FOSS product to perform (DHCP, DNSmasq derivative & this specific configuration) but I need to rely solely on OPNsense now. DNSmasq is disabled in my OPNsense instance and I would prefer to limit myself to Unbound.

For that, using a single DHCP mapping will give you only one DNS name with the corresponding IP.

With Unbound overrides, you can have one DNS->IP mapping with explicit aliases, where you could register the other names for your name-based virtual hsting.

There is also the option to use a name like *.server1.domain.org if you want all the names point to one IP.
Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

@meyergru:

Could you please clarify just a little bit more (for a newbie)? Under Unbound DNS, how do I navigate to the page where I can enter the data in the wildcard format that you have illustrated? I stepped through General, Overrides, Advanced, Access Lists and Query Forwarding but could not understand which of these pages could help me enter the wildcard formatted string, *.server1.domain.org, that you provided as an example. In my situation, server1.domain.org is being resolved by Unbound DNS locally. I feel that your example would serve my purpose much better than what I had used previously (one record for each virtual host). Thanks.

Regards.

You can do that whereever you want, in the override itself or in one of its aliases. Shall I cite Nike? "Just do it"

Intel N100, 4 x I226-V, 16 GByte, 256 GByte NVME, ZTE F6005

1100 down / 800 up, Bufferbloat A+

You can access override rules of Unbound in Services ---> Unbound ---> Overrides

In the overrides window, select + icon under "hosts" which is at the top above aliases


Thanks, @meyergru & @Vilhonator, for your patience & understanding. Your solution did the job for me.

Regards.