[root@www named]yum -y install bind //升级安装的包
[root@www named]#vim /etc/named.conf
//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
options {
listen-on port 53 { any; }; //改为any
// listen-on-v6 port 53 { ::1; }; //注销这行
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { any; }; //改为 any
recursion yes;
dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
=========================================================
==================================
[root@www named]# vim /etc/named.rfc1912.zones //添加正反向区域
// named.rfc1912.zones:
//
// Provided by Red Hat caching-nameserver package
//
// ISC BIND named zone configuration for zones recommended by
// RFC 1912 section 4.1 : localhost TLDs and address zones
// and
// (c)2007 R W Franks
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "localhost.localdomain" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
//注释这几行
//zone "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
// type master;
// file "named.loopback";
// allow-update { none; };
//};
//zone "1.0.0.127.in-addr.arpa" IN {
// type master;
// file "named.loopback";
// allow-update { none; };
//}; //注销这几行
zone "0.in-addr.arpa" IN {
type master;
file "named.empty";
allow-update { none; };
};
//添加正反向
zone "hasee.com" IN {
type master;
file "hasee.com.zone";
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.zone";
};
===========================================================================================
[root@www named]# pwd
/var/named/chroot/var/named
[root@www named]#
[root@www named]#touch hasee.com.zone //创建正向数据文件
[root@www named]#touch 1.168.192.zone //创建反向数据文件
[root@www named]#vim hasee.com.zone
===========================================================================================
$TTL 86400
@ IN SOA ns.hasee.com. root.hasee.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS ns.hasee.com.
ns IN A 192.168.1.8
www IN A 192.168.1.8
===========================================================================================
[root@www named]#vim 1.168.192.zone
===========================================================================================
$TTL 86400
@ IN SOA ns.hasee.com. root.hasee.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS ns.hasee.com.
8 IN PTR ns.hasee.com.
阅读(1174) | 评论(0) | 转发(1) |