Forward query for specific zone based on client ip

Hi, I am trying to configure unbound for forwarding queries when a
specific zone (i will use example.org as an example) is queried by a
specific client (I will use subnet 10.20.30.0/24 as an example).

My core idea is:

if ((10.20.30.0/24) && (zone=example.org)):
    forward-zone:
      name: "example.org"
      forward-addr: 10.1.1.1

if any other client or domain:
    use recursion or other configured stub-zones as usual

I am reading docs for Tags & Views but that does not seem to support
whan I want to do. I know I could do this in bind by using views and
match-client, however in unbound my approach does seem to be false. Do
you guys think it's possible to define such a condition? Any hints?

Thanks

Josef

Hi Josef,

Whenever there’s a request for example.org from 10.20.30.0/24 then they should get A record 10.1.1.1 for example.org

Is this what you are looking for?

Kindly correct me if I’m wrong

Regards
Manish

Hello Manish,
no, I would like, whenever there is a request for example.org,
intranet.example.org, mail.example.org, etc. from 10.20.30.0/24, the
unbound should forward the request to 10.1.1.1, get the answer from
it, and return acquired the answer to the client from 10.20.30.0/24.
Instead of forward, the stub-zone could probably work too.

Cheers
Josef