Forward specific zone and refuse others

Hello, unbound-users!

It is unclear for me, is unbound capable to serve one zone as forwarder and refuse other queries?

The desired configuration is:

  • forward queries about “example.org” and subhosts (“*.example.org”) to specific NS

  • refuse or drop other queries

Is it possible to configure unbound in that way?

No hints;
forward-zone;

Hi Kirill,

You can block queries for all names, and then add an exception for
example.org using local-zones:

local-zone: "." refuse
local-zone: "example.org" transparent

And then configure a forwarder for example.org.

Regards,
-- Ralph

Thanks for the reply, Eduardo.

I did following:

  • removed hints file and commented out the configuration string

  • tried to drop cache with “unbound-control flush google.com

  • restarted unbound

But it still answers me with correct address when I’m checking with:

dig +short google.com @dns01.example.org

Probably I did something wrong, but thanks for idea anyways!

Many thanks, Ralph!

That worked for me!