allow-query

日期:2015/7/28 主機房暑期訓練

說明:

限制可向DNS主機查詢的要求,
只回應有在allow-query內的主機或網段查詢。

方法:

  1. 修改named.conf

    % vi /etc/namedb/named.conf
    
  2. 加入此行

    zone "example.com" {
        type master;
        allow-query { 192.168.1.0/24;  168.95.192.1/32; 168.95.1.1/32; };
            # 只開放LAN網段Hinet Cache DNS Server 的查詢要求
    };
    
  3. 允許所有主機皆可向此DNS查詢

    zone "example.com" {
         ...
         allow-query { any; };
         ...
    };
    
  4. 可搭配取控制清單(Access Control List,ACL)使用

    acl "Private-IP" {
         192.168.0.0/16;     # 設定192.168.*.*為Private-IP清單
    };
    zone "example.com" {
         allow-query { Private-IP; };     # 允許Private-IP清單
    };
    

results matching ""

    No results matching ""