Linux下源代码编译bind9.6安装和配置DNS服务器

2020-03-03 16:38:14 来源:范文大全收藏下载本文

Linux下源代码编译bind9.6安装和配置DNS服务器

Linux下源代码编译bind9.6安装和配置DNS服务器

http://www.daodoc.com\"{

type master;

file \"fashionfree.fwd\";

};

#zone \"0.168.192.in-addr.arpa\" {

# type master;

# file \"master/test75.rev\";

#};

使用rndc-confgen>rndc.conf生成key文件然后通过tail -n10 rndc.conf | head -n9 | sed -e s/#\\ //g >>named.conf将key文件写入name.conf

key \"rndc-key\" {

algorithm hmac-md5;

secret \"YMVkQroow6D4rYGffjOkQw==\";

};

controls {

inet 127.0.0.1/* port 953

allow { 127.0.0.1/any; } keys { \"rndc-key\"; };

};这决定rndc用户要用什么加密密钥来验证身份才能给域名服务器发送控制消息

rndc是 bind 软件引进的远程控制通道,代替unix信号来控制 named 进程,可以用来对配置进行重新载入

#named -c named.conf

notify — Controls whether named notifies the slave servers when a zone is updated.It accepts the following options:

yes — Notifies slave servers.

no — Does not notify slave servers.

explicit — Only notifies slave servers specified in an also-notify list within a zone statement.

allow-update — Specifies the hosts that are allowed to dynamically update information in their zone.The default is to deny all dynamic update requests.

acl.conf:

acl \"CNC\" {

58.16.0.0/16;

xx.xx.xx.xx/xx;

}

allow-recursion

设定哪台主机可以进行递归查询。如果没有设定,缺省是允许所有主机进行递归查询。注意禁止一台主机的递归查询,并不能阻止这台主机查询已经存在于服务器缓存中的数据。 recursion

如果是yes,并且一个DNS询问要求递归,那么服务器将会做所有能够回答查询请求的工作。如果recursion是off的,并且服务器不知道答案,它将会返回一个推荐(referral)响应。默认值是yes。注意把recursion设为no,不会阻止用户从服务器的缓存中得到数据,它仅仅

阻止新数据作为查询的结果被缓存。服务器的内部操作还是可以影响本地的缓存内容,如NOTIFY地址查询。

1.递归查询:

一般客户机和服务器之间属递归查询,即当客户机向DNS服务器发出请求后,若DNS服务器本身不能解析,则会向另外的DNS服务器发出查询请求,得到结果后转交给客户机;

2.迭代查询(反复查询):

一般DNS服务器之间属迭代查询,如:若DNS2不能响应DNS1的请求,则它会将DNS3的IP给DNS2,以便其再向DNS3发出请求;

举例:比如学生问老师一个问题,王老师告诉他答案这之间的叫递归查询。这期间也许王老师也不会,这时王老师问张老师,这之间的查询叫迭代查询!

不能在父域里面设定子域主机的A记录,因为dns查询过程是先查询父域的,遇到子域的主机就自动通过NS记录转到子域区文件里面去查询了。

dns查询过程:以查询[url] ,而你有 ns1與 ns2 兩台 server 。

那,你必需從 .com 的權威伺服器授權給你,其設定或類似如此:

[Copy to clipboard] []CODE:

$ORIGIN abc.com.

@ IN NS ns1.abc.com.

@ IN NS ns2.abc.com.

ns1 IN A 1.2.3.4

ns2 IN A 1.2.3.5

不過,既然 SOA 是自己的話,那事實上,我可以改變 ns 或增加 ns 授權:

[Copy to clipboard] []CODE:

$ORIGIN abc.com.

sub1 IN NS ns1.sub1.abc.com.

sub1 IN NS ns2.sub1.abc.com.

ns1.sub1 IN A 4.3.2.1

ns2.sub1 IN A 4.3.2.2

然而,不同版本的 resolver ,對最終的 ns 判定是不一樣的:

bind9 是以 abc.com 的權威主機的 ns 為依據,若找不到,那就沒結果。

而之前的版本,則可退而求次,以 com.裡關於 abc.com 的 ns 為答案。

aclslave_servers { 192.168.0.2;192.168.0.3; };

zone \"mydomain.com\" {

type master;

file \"mydomain.com.zone\";

notify yes;

allow-transfer { slave_servers; };

also-notify { slave_servers; };

};

notify

If yes (the default), DNS NOTIFY meages are sent when a zone the server is authoritative for changes, see Section 3.3.The meages are sent to the servers listed in the zone’s NS records (except the master server identified in the SOA MNAME field), and to any servers listed in the also-notify option.

If explicit, notifies are sent only to servers explicitly listed using also-notify.If no, no notifies are sent.

The notify option may also be specified in the zone statement, in which case it overrides the options

notify statement.It would only be neceary to turn off this option if it caused slaves to crash.

6.2.14.6

also-notify

Defines a global list of IP addrees of name servers that are also sent NOTIFY meages whenever

a fresh copy of the zone is loaded, in addition to the servers listed in the zone’s NS records.This helps to ensure that copies of the zones will quickly converge on stealth servers.If an also-notify list is given in a zone statement, it will override the options also-notify statement.When a zone notify statement is set to no, the IP addrees in the global also-notify list will not be sent NOTIFY meages for that zone.The default is the empty list (no global notification list).

使用notify指令会自动通知所有这个域的所有在ns记录上的机器,also-notify指令可以用来通知所有不在ns记录上的dns服务器。

DNS服务器的配置实验报告

Linux下Apache服务器的安装和配置

windows下dns服务器的搭建

Linux的使用与 DNS 服务器的配置与管理

WWW服务器的安装与配置

实训五:DNS 服务器的配置与管理教案纸

基于Linux平台(RedHat)安装配置实现Web服务器

Windows Server 2003服务器安装、配置与应用实例

linux下的安装与配置tuexdo

Linux下配置完整安全的DHCP服务器详解

《Linux下源代码编译bind9.6安装和配置DNS服务器.doc》
Linux下源代码编译bind9.6安装和配置DNS服务器
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

相关推荐

    下载全文