域名服务器BIND返回不同IP根据客户端的IP

域名服务器BIND返回不同IP根据客户端的IP

 

最简单的场景就是,不同国家的ip返回不同服务器ip,

view "officeA" {
   match-clients { 192.168.1.0/24; };

   include "/etc/named.conf.zones-rfc1912";
   include "/etc/named.conf.zones-common";
   include "/etc/named.conf.zones-officeA";
};

view "officeB" {
   match-clients { 192.168.2.0/24; };

   include "/etc/named.conf.zones-rfc1912";
   include "/etc/named.conf.zones-common";
   include "/etc/named.conf.zones-officeB";
};

 

参考:

http://serverfault.com/questions/332440/dns-bind-how-to-return-a-different-ip-based-on-requests-subnet

版权所有,禁止转载. 如需转载,请先征得博主的同意,并且表明文章出处,否则按侵权处理.

    分享到:

留言

你的邮箱是保密的 必填的信息用*表示