在BIND中recursion转发区域

我有一个BIND设置的VPS。 它运行好几个月。

最近我想build立另一个DNS程序来pipe理这个VPS上的foo.example.org子域。 我已经在dns.he.net中设置了这些:

  foo.example.org。 在NS vps.exmaple.org。
 vps.example.org。  IN xx.xx.xx.xx 

由于BIND在53 / udp上侦听,因此我将它configuration为侦听端口5353和named.conf

区域“foo.example.org”{
 键入向前;
 转发器{127.0.0.1端口5353;  };
 }; 

我认为这个configuration会把*.foo.example.org所有查询*.foo.example.org到第二个DNS程序。 但是当我testing它…

在VPS本身:

dig bar.foo.example.org @127.0.0.1 -p5353作品不错。

dig bar.foo.example.org @127.0.0.1工作良好。

在我的笔记本上:

dig bar.foo.example.org @vps.example.org -p5353作品不错。

dig bar.foo.example.org @vps.example.org工作良好。

dig foo.example.org @8.8.8.8 -t ns工作良好。

dig bar.foo.example.org @8.8.8.8返回SERVFAIL

replace8.8.8.8与其他DNS服务器得到相同的结果,并没有什么错误的TTL。

有没有人知道我的configuration有什么问题? 这里是更多的信息:

其他BIND9configuration:

选项{
  目录“/ var / cache / bind”;
  通知是;
   allow-transfer {xx.xx.xx.xx;  };
   dnssec-enable是;
   dnssec-validation auto;
   auth-nxdomain no;  #符合RFC1035
   listen-on-v6 {any;  };
  recursion是的;
   allow-recursion {any;  };
 }; 

具体来说,“第二个DNS程序”是碘,它通过DNS查询将IP隧道化。 我按照这个指南来设置它在BIND9后面: http : //dev.kryo.se/iodine/wiki/TipsAndTricks#RunningiodinebehindBIND9

PS:我已经尝试使用dnsmasq设置另一台服务器,并使用server=/foo.example.org/127.0.0.1#5353进行testing。 仍然有错误。

谁能帮忙? 提前致谢。

首先,我build议你使用5353以外的东西作为DNS服务器的备用端口。 5353与zeroconf / mDNS冲突。

当你使用vps.example.org作为recursionparsing器的时候,它的工作原理就是因为这是唯一的recursion服务器,它被告知需要去端口5353上的一个特殊的DNS服务器来findfoo.example.org

因为你不能在一个NSlogging中指定一个端口号,所以通常不可能在53以外的端口上拥有一个权威的服务器。世界上所有的recursion名称服务器都将find相关域的NSlogging并尝试在端口53上联系该服务器。如果您希望他们使用不同的端口,则必须使用指向端口5353的前向区域来configuration其中的每一个端口。

顺便说一句,目前还不清楚为什么你要在不同的端口(或IP地址)上的一个单独的名称服务器上托pipefoo.example.org 。 为什么不把foo.example.org区域添加到提供example.org的相同权威名称服务器?