Forward query for specific zone based on client ip

Josef Vybíhal josef.vybihal at gmail.com
Wed Jan 18 11:17:16 UTC 2023


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