bind 安装条件

bind 安装基本软件
bind-9.2.4-16.EL4.i386.rpm
bind-libs-9.2.4-16.EL4.i386.rpm
bind-utils-9.2.4-16.EL4.i386.rpm
bind-devel-9.2.4-16.EL4.i386.rpm
CentOS 5 下面有个 caching-nameserver-9.3.3-7.el5.i386.rpm
而且 CentOS 5下面配置文件也不是/etc/named.conf 而是 /etc/named.caching-nameserver.conf
/etc/named.rfc1912.zones
安装软件包:
rpm -iUvh bind*.rpm
安装后执行以下命令配置DNS服务开机自启动
chkconfig named on

centos5.1 dns配置方法哪里有问题?

系统环境centos5.1 + bind-9.3.3
服务器IP地址为:10.1.1.1子网掩码255.255.255.0网关:10.1.1.1DNS:10.1.1.1
另一个windows服务器IP地址为1.1.1.9子网掩码255.255.255.0网关:无NDS:10.1.1.1

/etc/named.caching-nameserver.conf
配置内容如下:
//
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver 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.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
listen-on port 53 { 1.1.1.1; };
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";
query-source    port 53;
query-source-v6 port 53;
allow-query     { any; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
match-clients     { localhost; };
match-destinations { localhost; };
recursion yes;
include "/etc/named.rfc1912.zones";
};
-----------------------------
/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
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "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.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.zero";
allow-update { none; };
};
zone "kingyes.com" IN {
type master;
file "kingyes.com.zone";
allow-query {any;};
};
zone "1.1.10.in-addr.arpa" IN {
type master;
file "10.1.1.zone";
allow-query {any;};
};
zone "cctv.com" IN {
type master;
file "cctv.com.zone";
allow-query {any;};
};
zone "1.1.1.in-addr.arpa" IN {
type master;
file "1.1.1.zone";
allow-query {any;};
};
------------------------------------------
/var/named下的正向解析和反向解析配置如下:
kingyes.com.zone内容如下:
$TTL 1D
$TTL 1D
@  IN SOA [url]www.kingyes.com[/url].  root. [url]www.kingyes.com.[/url] (
     43  ; serial (d. adams)
     3H  ; refresh
     15M  ; retry
     1W  ; expiry
     1D )  ; minimum
         IN NS  10.1.1.1
  IN MX 5  10.1.1.1
www  IN A  10.1.1.1
---------------
10.1.1.1.zone内容如下:
$TTL 1D
@       IN      SOA      [url]www.kingyes.com[/url]. root. [url]www.kingyes.com.[/url]  (
                                      1997022701 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      10.1.1.1
1       IN      PTR      [url]www.kingyes.com[/url].
------------------
cctv.com.zone内容如下:
$TTL 1D
$TTL 1D
@  IN SOA [url]www.cctv.com[/url].  root. [url]www.cctv.com.[/url] (
     43  ; serial (d. adams)
     3H  ; refresh
     15M  ; retry
     1W  ; expiry
     1D )  ; minimum
         IN NS  10.1.1.1
  IN MX 5  10.1.1.1
www  IN A  1.1.1.9
-------------------------
1.1.1.zone内容如下:
$TTL 1D
@       IN      SOA      [url]www.cctv.com[/url]. root. [url]www.cctv.com.[/url]  (
                                      1997022701 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      3600000    ; Expire
                                      86400 )    ; Minimum
        IN      NS      10.1.1.1
9 IN PTR [url]www.cctv.com[/url].
----------------

通过如上配置,在linxu服务器下使用nslookup和host命令测试都提示"connection timed out: [url]www.kingyes.com[/url] no servers could be reached"

你可能感兴趣的:(linux,职场,休闲)