Conditional Forwarding and Split Horizon DNS

I dont have a quick solution but ... CF consists of two parts.
One part for forward lookups (name to IP) and one part for reverse lookups (IP to name).

Above bit instructs forward lookups for the domain: domain.local to be forwarded to DNS server 10.1.10.20.
And reverse lookups for the 10.1.0.0/16 addresses to be forwarded to also 10.1.10.20.
Forward lookup example with 10.0.0.2 being my Pi-hole:

$ dig +short @10.0.0.2 hak01
10.0.0.145

Reverse lookup example:

$ dig +short @10.0.0.2 -x 10.0.0.145
hak01.home.dehakkelaar.nl.

From above, not sure if you can split up the domain: domain.local into two subnets with embedded dnsmasq like above.
I suspect dnsmasq will pick the first or last one only from above two directives.
Try changing the order to play around and follow the logs live to see what happens when testing:

sudo pihole tail

Above only deals with reverse lookups and not the forward lookups for domain.local!

Ps. about the .local search/suffix domain above:

1 Like