Sex Chapm

DNS Bindz 烂漫时空 - BlogJava After Cocksuckerchamp And Landa Sex Slave Cock Sucker Chapm

After Cocksuckerchamp And Landa Sex Slave Cock Sucker Chapm

FONT>

/bind.html),也可以使用本文所提供的样例文件。

 

默认情况下,安装的deamon为/usr/local/sbin/named

默认的主配置文件,/etc/named.conf(须手动建立)。

 

2.启动:

[root@localhost root]# /usr/local/sbin/named -g

/usr/local/sbin/named默认情况是一个后台deamon ,-g选项表示前台运行,并将调试信息打印到标准输出,这在我们安装调试阶段是非常有帮

助的。

如果建立了配置文件和域名解析文件(关于怎样建立将在下面的部分讲到),ps aux 应该可以查到named 的进程,或netstat -an 也可以看到

53端口的服务已经起来了。(DNS默认端口为53)

如果要设置开机自启动DNS server,只需在/etc/rc.d/rc.local中加入一行

/usr/local/sbin/named

#!/bin/sh
#
# This script will be executed *after* all the other init scripts.
# You can put your own initialization stuff in here if you don't
# want to do the full Sys V style init stuff.
touch /var/lock/subsys/local

/usr/local/sbin/named

 

四.软件的配置。

1.主配置文件

默认安装主配置文件的位置为

/etc/named.conf

下面逐步分析一个比较基础的配置文件:(注:named配置文件采用和c语言相同的注释符号)。

(1) log options


/*
* log option
*/
logging {};
channel audit_log {};
category default {};
category general {};
category security {};
category config {};
category resolver {};
category xfer-in {};
category xfer-out {};
category notify {};
category client {};
category network {};
category update {};
category queries {};
category lame-servers {};
};

这一部分是日志的设置,其中最主要的是

file "var/log/named.log" 这一句指定了日志文件的位置,要正常启动named,必须要保证这一文件是存在的,并且named 进程对它有读写权

限。

(2) options

options {};

// If you've got a DNS server around at your upstream provider, enter
// its IP address here, and enable the line below.  This will make you
// benefit from its cache, thus reduce overall DNS traffic in the Internet.

forwarders {};

/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below.  Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;

/*
* If running in a sandbox, you may have to specify a different
* location for the dumpfile.
*/
dump-file "etc/named_dump.db";
};

这一部分是一些基本的配置项:

directory "etc/namedb"; 指定域名解析等文件的存放目录(须手动建立);

listen-on-v6 {}; 支持ipv6的请求;

forwarders {}; 指定前向DNS,当本机无法解析的域名,就会被转发至前向DNS进行解析。

dump-file "etc/named_dump.db"; 指定named_dump.db文件的位置。

(3) 线索域和回环域

指定线索域和本地回环域,这一部分使用一些标准的例子就可以。

file "named.root"; 指定该域的解析文件,其目录为options中directory "etc/namedb";指定的。在本例中为/etc/namdb。

(4)自定义域
zone "test.com" {};

zone "0.168.192.in-addr.arpa" {};
zone "4.0.0.f.0.5.2.0.1.0.0.2.IP6.ARPA" {};
        allow-query {};
file "ipv6.rev";
};

zone "lowerlevelzone.test.com" {};
};

这一部分是配置文件中我们需要重点关心的部分:

zone "test.com" {}; 设定test.com域;

type master 指明该域主要由本机解析;

t DNS Bindz 烂漫时空 - BlogJava After Cocksuckerchamp And Landa Sex Slave Cock Sucker Chapms Sucker v DNS Bindz 烂漫时空 - BlogJava After Cocksuckerchamp And Landa Sex Slave Cock Sucker Chapmr g Cock Chapm