howto override a zone using views?

Kevin Darcy kcd at chrysler.com
Fri Aug 22 21:29:17 UTC 2008


David Sparks wrote:
> Is there some way to do something like this:
>
> view "internal" {
>   match-clients { 10.0.0.0/8; };
>   zone a file a ...
>   zone b file b ...
>   zone c file c ...
> };
>
> view "override-internal-a" {
>   match-clients { 10.1.2.3; };
>   zone a file d ... // only override zone a, zones b and c come from internal view
> }
>
>
> such that client 10.1.2.3 can lookup entries in zones b and c (through the 
> "internal" view)?  
No, views are selected on a "first match" basis, so 10.1.2.3 will never 
be matched by the second view.
> What I'm doing right now is cutnpaste view "internal" as 
> "override-internal" and then making the changes.  However this is duplicating 
> a lot of information.
>
> It looks like I could do this by putting all the zones into a file and use 
> "include zones" inside each view statement.  This is not as clean a solution 
> as I was hoping for.
>   
Think of "view"s as just a convenient way to run multiple "virtual" 
nameserver instances within a single "physical" instance. Each "virtual" 
needs a full set of zone definitions for the zones that it serves. 
"include"s can be used to make that even more convenient.

                                                                         
                           - Kevin




More information about the bind-users mailing list