Chinaunix首页 | 论坛 | 博客
  • 博客访问: 103678454
  • 博文数量: 19283
  • 博客积分: 9968
  • 博客等级: 上将
  • 技术积分: 196062
  • 用 户 组: 普通用户
  • 注册时间: 2007-02-07 14:28
文章分类

全部博文(19283)

文章存档

2011年(1)

2009年(125)

2008年(19094)

2007年(63)

分类: LINUX

2008-04-28 20:59:24

 
文章来源中国IT实验室收集整理 
    Linux下搭建DNS Server的软件首选Bind,其有不同的版本,Window DNS是从Bind 4.x改进过来的,另外Bind8.x和Bind9.x从安全性及扩充性方面做了很多改进,为了实现对IPv6DNS的支持,采用Bind v9来实现,bind9.x提供IPv6 socket的DNS查询,支持IPv6资源记录?关于Bind9.x的详细特性建议到Bind的Web站点查阅,Bind的最新版本可以到 去?

   

 #wget
# tar -xzf bind-9.2.1.tar.gz
# cd bind-9.2.1
#./configure -enable-ipv6 -with-openssl
# make && make install

    Bind软件安装后,会产生几个固有文件,分为两类?一类是配置文件在/etc目录下,一类是DNS记录文件在/var/named目录下?加上其他相关文件,共同设置DNS?named.conf为默认的主配置文件(须手动建立),设置一般的named参数,指向该使用的域数据库信息的源,这类源可以是本地磁盘文件或远程服务器?

        named .ca :指向根域名服务器
        named .1ocal :用于在本地转换回送地址
        named .hosts :将主机名映射为IP地址

        下面以笔者实验建立的纯IPv6实验网的域名secv6.your.domain为例说明如何配置支持AAAA及A6记录的IPv6 域名服务器。

    文件清单1 /etc/named.conf

   

 options ...{
directory "/var/named";

// a caching only nameserver config
zone "." IN ...{
type hint;
file "named.ca";
};

// this defines the loopback name lookup
zone "localhost" IN ...{
type master;
file "master/localhost.zone";
allow-update ...{ none; };
};

// this defines the loopback reverse name lookup
zone "0.0.127.in-addr.arpa" IN ...{
type master;
file "master/localhost.rev";
allow-update ...{ none; };
};

// This defines the secv6 domain name lookup
// Secure (signed) zone file is
// secv6.your.domain.signed
// Regular zone file is secv6.your.domain
zone "secv6.your.domain" IN ...{
type master;
file "master/secv6.your.domain.signed";
// file "master/secv6.your.domain";
};

// this defines the secv6 domain reverse
// name lookup (AAAA)
zone "secv6.int" IN ...{
type master;
file "master/secv6.int";
};

// this defines the secv6 domain reverse
// name lookup (A6)
zone "secv6.arpa" IN ...{
type master;
file "master/secv6.rev";
};

// secret key truncated to fit
key "key" ...{
algorithm hmac-md5;
secret "HxbmAnSO0quVxcxBDjmAmjrmhgDUVFcFNcfmHC";
};

    文件清单2 /var/named/master/secv6.your.domain

   

 $TTL 86400
$ORIGIN secv6.your.domain.
@ IN SOA secv6.your.domain. hostmaster.your.domain. (
2002011442 ; Serial number (yyyymmdd-num)
3H ; Refresh
15M ; Retry
1W ; Expire
1D ) ; Minimum
IN MX 10 noah.your.domain.
IN NS ns.secv6.your.domain.
$ORIGIN secv6.your.domain.
ns 1D IN AAAA fec0::1:250:b7ff:fe14:35d0
1D IN A6 0 fec0::1:250:b7ff:fe14:35d0
secv6.your.domain. 1D IN AAAA fec0::1:250:b7ff:fe14:35d0 1D IN A6 0
fec0::1:250:b7ff:fe14:35d0
pc2 1D IN AAAA fec0::1:250:b7ff:fe14:35d0 1D IN A6 0
fec0::1:250:b7ff:fe14:35d0
pc3 1D IN A6 0 fec0::1:250:b9ff:fe00:131 1D IN AAAA
fec0::1:250:b9ff:fe00:131
pc6 1D IN A6 0 fec0::1:250:b7ff:fe14:3617 1D IN AAAA
fec0::1:250:b7ff:fe14:3617
pc4 1D IN A6 0 fec0::1:250:b7ff:fe14:35c4 1D IN AAAA
fec0::1:250:b7ff:fe14:35c4
pc5 1D IN A6 0 fec0::1:250:b7ff:fe14:361b 1D IN AAAA
fec0::1:250:b7ff:fe14:361b
pc7 1D IN A6 0 fec0::1:250:b7ff:fe14:365a 1D IN AAAA
fec0::1:250:b7ff:fe14:365a
pc1 1D IN A6 0 fec0::1:250:b9ff:fe00:12e 1D IN AAAA
fec0::1:250:b9ff:fe00:12e
pc1 1D IN A6 0 fec0:0:0:1::1 1D IN AAAA fec0:0:0:1::1
$INCLUDE "/var/named/master/Ksecv6.your.domain.+003+27034.key"

阅读(505) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~