Forward query for specific zone based on client ip

Josef Vybíhal josef.vybihal at gmail.com
Thu Jan 19 07:41:37 UTC 2023


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

On Wed, Jan 18, 2023 at 5:39 PM Manish <b0069576 at gmail.com> wrote:
>
> 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
>
> On Wed, 18 Jan, 2023, 16:47 Josef Vybíhal via Unbound-users, <unbound-users at lists.nlnetlabs.nl> wrote:
>>
>> 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


More information about the Unbound-users mailing list