I am looking for a way to restrict the clients to which Unbound should
answer on a specific domain. For instance, answer to ranges defined by
the RFC1918 in general, but only allow access to example.local for the
clients in the 10.0.0.0/8 range.
To be more explicit, the aim is to prevent some clients (although they
are legitimate in the general case, and should be answered for external
domains) to query some internal domain names (private TLD).
If I cannot do anything else, I will go for multiple instances, which is
far from being optimal (would mean more resources, multiple instances of
cached answers, necessity to use mutiple IP addresses,etc...).
AFAIK Unbound has no such complicated access control facilities.
If you are run Unbound on Linux, you can block a packet
which contains specific string by Netfilter. For example
this iptables rule drops UDP queres for "example.local"
which is not originated by 10.0.0.0/8 clients: