How to override one entry in a bind9 view?

Make that single slave name server the master for zone foo.example.info and only show it in the desired view, e.g.

view all-clients {
  match-clients { lan; !192.168.0.10/32; dmz; };
  zone "example.info" {
    type slave;
    masters { 10.100.10.254; };
    file "/var/bind/db.example.info";
  };
};

view exception-host {
  match-clients { 192.168.0.10; };
  zone "foo.example.info" {
    type master;
    file "/etc/bind/foo.example.info-for-192.168.0.10";
  };

  zone "example.info" {
    in-view all-clients;
  };
};

Now when the 192.168.0.10 requests a lookup, it'll see the "exception-host" view and get a different response for the record "foo.example.info". Otherwise, it gets the same results as all other clients doing a lookup.


You're missing 'match-clients' statements in your views to indicate which acls are allowed to use the view. For example, you probably want something like:

view dmz {
  match-clients { dmz; };
  zone "example.info" {
    type slave;
    masters { 10.100.10.254; };
    file "/etc/bind/db.example-dmz.info";
  };

};

And a corresponding entry for the 'lan' view.