bind 內網查詢

//#####################################################
acl "lan" {

192.168.0.0/24; // LAN IP 範圍標示

};
//#####################################################

view "internal" { // 給內部使用者查詢的設置

match-clients { lan; }; // lan 的 IP 範圍是在 acl "lan" 敘述中所設定

zone "." IN {
type hint;
file "named.ca";
};

zone "kwcpa.com.tw" IN {
type master;
file "internal.kwcpa";
allow-transfer { none; };
};

};

//#################################################
view "external" { // 給外部使用者查詢的設置

match-clients { any; }; // any 表示任何 IP, 毋需以 acl 設定

zone "." IN {
type hint;
file "named.ca";
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "kwcpa.com.tw" IN {
type master;
file "named.kwcpa";
allow-transfer { none; };
};

};

//#############################################

controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};

zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};

zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};

zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};

zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};

zone "kwcpa.com.tw" IN {
type master;
file "named.kwcpa";
};

logging {
category lame-servers { null; };
};

include "/etc/rndc.key";

本篇發表於 linux-bind, 未分類。將永久鍊結加入書籤。

發表迴響

您的電子郵件位址並不會被公開。 必要欄位標記為 *

*

您可以使用這些 HTML 標籤與屬性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>