I am trying to configure Unbound as a server that forwards all queries about specific domains to Route 53. That part I managed to configure using forward zones for each domain I want to serve. The problem is that the server has to drop every other query about every other domain and this is something I haven’t been able to configure. If a user tries to resolve facebook or google or anything else it will just send a reply. Can anyone offer some tips on how to achieve that?
Two ways, as a validator that queries the root servers and follows the
chain, or use a wildcard forward for all of the other domains you
don't want to specifically route to a particular cache.
Ex. of forward:
Thanks for your reply, but that will only have the queries answered by a different server. I don't want them answered at all. The endpoints that will be configured with that DNS server must only be able to resolve the domains that I will specifically configure with a forward zone. Everything else must be denied, sorry if I wasn't clear enough in my initial query.
Thanks
Aggelos Kanarelis
Systems Engineer
Arts Alliance Media Ltd
T: +44 (0)20 7751 7525 / M: +44 (0) 7809427708
Aggelos.kanarelis@artsalliancemedia.com
www.artsalliancemedia.com
Landmark House
Hammersmith Bridge Road
London W6 9EJ
The order does not matter for local-zone, local-data, forward and stub
clauses. Unbound picks the closest one. First the local-zone and
local-data statements are processed. Then the cache of forward and stub
data. Then the lookup vi forward and stub data.
You could create a local-zone: "." refuse and local-zone: "example.com"
transparent for all of the names you want resolved. If you want those
names forwarded somewhere, you can then also include forward clauses for
those names. The other names are rejected.
And also add local-zones name transparent for your names for which you
also have the forward-zones. Those local-zones with the local zone type
transparent make holes in the refuse policy for '.', and unbound uses
the most specific local-zone, so unbound then allows the names that are
transparent, but then denies all the other names.