Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I'd like to create some access policy by bind and I'm wondering if is it possibile to setup dynamic/parametric lookup answers in bind per-client. Something like:

// Answer to nslookup example.com
if($client_ip == '')
   return ('');
   return ('');

In alternative I could create a secondary bind instance using -c secondary-bind-config.conf on another interface but I'd like to have just an instance of bind running.

share|improve this question
[group-policy]? Are you running bind on Windows? –  jscott Nov 10 '11 at 18:51

1 Answer 1

up vote 1 down vote accepted

You use view statement

From zytrax guide:

view "local" {
 match-clients {;};
  zone "example.com" {
   type master;
   file "example.com-80.36.etc";

view "all" {
 match-clients { "any";};
  zone "example.com" {
   type master;
   file "example.com-127.etc";

In one zone file you include one set of ips, in second file - another set.

share|improve this answer
Great! Thank you! –  Eddie C. Nov 10 '11 at 19:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.