BIND v9.9.7, Views and includes

Solution 1:

If upgrading to Bind 9.10 is a possibility, the "in-view" statement would solve this perfectly ( http://www.zytrax.com/books/dns/ch7/zone.html#in-view ).

However, if that's not possible, I noticed something quite interesting that I did not know while looking up "in-view". For slave zones, the "file" parameter (it happens to immediately precede "in-view" in the above link) is optional. This might be just the solution you're looking for. I'm assuming the zone would exist only in RAM and get retransferred every time the slave restarted or reloaded the zone. It's worth a shot. (Edit: You'd still need 2 versions of your common file, one for masters with file names, and one without - so this isn't quite a perfect solution)

Solution 2:

Perhaps with a named.conf configuration of:

view "sitea" {
  include "/etc/common_zones.conf";
  match-clients {localhost; ...; };
};
view "siteb" {
  include "/etc/UNcommon_zones.conf";
  match-clients {any;};
};

And then common_zones.conf is what it currently is, while over in UNcommon_zones.conf you put in forwarders:

zone "..." IN {
  type forward;
  forward only;
  forwarders { 127.0.0.1; };
};

which at least does not error out in quite limited testing with a test virt pulling a master zone and another test virt issuing queries to said test slave NS.