blocky
blocky copied to clipboard
Conditional DNS resolution for wildcards of TLD
I would like to specify the upstream DNS server using conditional DNS resolution for a subset of TLDs.
Use Case
I use .foobar
as the TLD for all of my devices and services on my internal private network. I have DNS entries on my DNS resolver at 192.168.1.1
which has host -> IP mappings as follows:
host1.foobar 192.168.1.41
host2.foobar 192.168.1.42
host3.foobar 192.168.1.43
I want blocky to resolve any hosts matching *.foobar
using an authoritative DNS server in my internal private network which has the above mappings (i.e. basically my DHCP server / router which is currently maintaining these mappings).
What I tried so far
The following does not work:
conditional:
mapping:
.foobar: 192.168.1.1
Currently, the above still ends up using the DNS resolvers configured under upstreams
. I have more than forty devices in my private network, and I don't want to use Custom DNS
to specify each of these host->IP mappings.
From the documentation
The documentation mentions the above should work if my internal domain names were of the form *.foobar.foobaz
. I don't see why it should be limited and why it can't be extended to also support *.foobar
use case as the one I described above (the one I am using in my private network homelab setup).
conditional:
mapping:
foobar.foobaz: 192.168.1.1