BIND9响应取决于服务器网卡

BIND9 response depending on server network card

我在专用网络上的 debian 8 上有 3 个虚拟机 运行。让我们将它们命名为 A、B 和 C。

=> C 是一个有 2 个网卡的虚拟机(我们将它们命名为 a 和 b)每个网卡都有不同的 IP 地址。 C服务器上安装了BIND9。

=> 一个服务器在网卡的 IP 上设置了他的 DNS

=> B服务器在b网卡的IP上设置了他的DNS

我如何根据要求的网卡调整 DNS 服务器响应,最好的方法是什么? 先感谢您 !

编辑:

# named.example01.conf

acl trusted { 192.168.7.0/24; localhost; };
acl guest   { 192.168.8.0/24; };

view trusted {
   match-clients { trusted; };

   allow-recursion { any; };

   zone "myzone.example" {
     type master;
     file "db.myzone.example";
   };
   zone "7.168.192.in-addr.arpa" {
     type master;
     file "db.192.168.7";
   };
};

view guest {
   match-clients { guest; };

   allow-recursion { any; };
};

viewmatch-destinations 语句一起使用。