置 - 烂


- BlogJava
Srdci Eroticnastyteen Hr Webnews N2 1 Erotic Nasty Teen(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 指明该域主要由本机解析;
file "zone.test "指定其解析文件为zong.test,目录为options中设定的目录本例中为/etc/named。
zone "0.168.192.in-addr.arpa" {}; 指定ipv4地址逆向解析
type master 指明该域主要由本机解析;
file "zone.test.rev "指定其解析文件为zong.test.rev,目录为options中设定的目录本例中为/etc/named。
zone "4.0.0.f.0.5.2.0.1.0.0.2.IP6.ARPA" {};
allow-query {};
file "ipv6.rev";
};指定ipv4地址逆向解析
type master 指明该域主要由本机解析;
file " ipv6.rev "指定其解析文件为ipv6.rev,目录为options中设定的目录本例中为/etc/named。
zone "lowerlevelzone.test.com" {};
}; 设定lowerlevelzone.test.com域;
type slave 指明该域主要由低一级的域名服务器解析;
masters {}; 指定低一级的域名服务器ip地址。
到此我们就初步建立了一个标准的named 的主配置文件,接下来建立对应的域名解析或逆向解析文件。
2.域名解析和IP地址逆向解析文件:
(1) 域名解析:
/etc/namedb/zone.test
; From: @(#)localhost.rev 5.1 (Berkeley) 6/30/90
; $FreeBSD: src/etc/namedb/PROTO.localhost.rev,v 1.6 2000/01/10 15:31:40 peter Exp $
;
; This file is automatically edited by the `make-localhost' script in
; the /etc/namedb directory.
;
@ IN SOA ns.test.com. root.test.com.(
2005030116; Serial
3600 ; Refresh
900 ; Retry
3600000 ; Expire
3600 ) ; Minimum
IN NS ns.test.com
;
ns IN A 192.168.0.1
www6 IN AAAA 2001:250:f004::10
www IN A 192.168.0.2
本文件前半部分是一些默认的参数设置,只需把域名改成对应得你要设置的域就行,其余的不用过分深究,如果读者有兴趣可以查阅相关的手册文档。
(注意,IN NS ns.test.com.; 这一条必须有,来指定本域的域名服务器 ;域名必须以"."结尾。)
本文件的第二部分(倒数三行),指定了该域上的主机:
g
DNS
Bind安装与
置 - 烂


- BlogJava
Srdci Eroticnastyteen Hr Webnews N2 1 Erotic Nasty Teenh b Teen Nasty Nasty Nasty
y
DNS
Bind安装与
置 - 烂


- BlogJava
Srdci Eroticnastyteen Hr Webnews N2 1 Erotic Nasty Teens i Erotic