歡迎您光臨本站 註冊首頁

DNS高級特性

←手機掃碼閱讀     火星人 @ 2014-03-29 , reply:0

地址區配列表和ACL

如法:
CODE:
acl name { address_match_list; };

以後name等價於對應的地址匹配列表。
CODE:
acl "internal" { 192.168.1.0/24; };

循環分配

如果一個域名有不止一個A記錄,現代的名字伺服器就會輪轉提供這些地址。
CODE:
jh.myhome.com 60 IN A 192.168.1.1
jh.myhome.com 60 IN A 192.168.1.2
jh.myhome.com 60 IN A 192.168.1.3

會以下的順序列出:
CODE:
192.168.1.1 192.168.1.2 192.168.1.3

然後是:
CODE:
192.168.1.2 192.168.1.3 192.168.1.1

然後是:
CODE:
192.168.1.3 192.168.1.1 192.168.1.2

然後再是第一種,不停地重複這樣的循環。

非遞歸名字伺服器:

使BIND名字伺服器以非遞歸模式運行:
CODE:
options {
recursion no;
};

如果你想不讓伺服器建立起緩存,那還需要將一個配置選項和recursion no一起使用:
CODE:
options {
fetch-glue no;
};

限制客戶端的數量 :
CODE:
options {
recursive-clients 10;
};

限制查詢:
CODE:
options {
allow-query { 192.168.1/24; };
};

限制關於某個特定區的查詢:
CODE:
acl "test" { 192.168.2/24; };

zone "myhome.com" {
type master;
file "db.myhome.com";
allow-query { "test"; };
};

想必大家能猜出是什麼意思。我就不寫了。

就到此為止吧。其它還有許多,但是我都沒有試過。
其實DNS還有許多其它內容,想必只有到實際中才能用到,只有到時候在說吧。呵呵

[火星人 ] DNS高級特性已經有383次圍觀

http://coctec.com/docs/linux/show-post-204065.html