yum -y install bind当然首先安装named软件

本地IP地址192.168.11.56

MAC地址255.255.255.0

本次配置的域名是uuu.server.world域名对应地址是192.168.11.56

1:/etc/named.conf配置

options {

#listen-on port 53 { 127.0.0.1; };   #any ipv4监听端口

listen-on-v6 { none; }; #ipv6监听端口

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     { localhost; 192.168.11.0/24; };#any允许所有主机查询

allow-transfer { localhost; 192.168.11.0/24; };

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;

       };

};

#change all from here

view "internal"{

match-clients {

localhost;

192.168.11.0/24;

};

zone "." IN {

       type hint;

       file "named.ca";

};

zone "uuu.server.world" IN {

type master;

file "uuu.server.world.lan";

allow-update { none; };

};

zone "11.168.192.in-addr.arpa" IN{

type master;

file "11.168.192.db";

allow-update { none; };

};

include "/etc/named.rfc1912.zones";

};

view "external"{

match-clients { any; };

allow-query { any; };

recursion no;

zone "uuu.server.world" IN {

type master;

file "uuu.server.world.wan";

allow-update { none; };

};

zone "56.11.168.192.in-addr.arpa" IN {

type master;

file "56.11.168.192.db";

allow-update { none; };

};

};


我这次配置一下几个文件时发现用#无法注释掉后面的内容,不知道为啥

2:/var/named/11.168.192.db文件配置

$TTL 86400

@ IN SOA dlp.server.world. root.server.world. (

2011071001 ;Serial

3600;Refresh

1800;Retry

604800;Expire

86400;Minimum TTL

)

IN NS dlp.server.world.

IN PTR server.world.

IN A 255.255.255.0

56IN PTR dlp.server.world.


3:/var/named/56.11.168.192.db文件配置

$TTL 86400

@IN SOA dlp.server.world. root.server.world. (

201107001;Serial

3600;Refresh

1800;Retry

604800;Expire

86400;Minimum TTL

)

IN NS dlp.server.world.

IN PTR server.world.

IN A 255.255.255.248

56IN PTRdlp.server.world.


4:/var/named/uuu.server.world.wan文件配置

$TTL 86400

@ IN SOA dlp.server.world. root.server.world. (

       2011071001 ;Serial

       3600 ;Refresh

       1800 ;Retry

       604800 ;Expire

       86400 ;Minimum TTL

)

       IN NS dlp.server.world.

       IN A 192.168.11.56

       IN MX 10 dlp.server.world.

dlp     IN A 192.168.11.56


5:/var/named/uuu.server.world.lan文件配置

$TTL 86400

@ IN SOA dlp.server.world. root.server.world. (

2011071001 ;Serial

3600 ;Refresh

1800 ;Retry

604800 ;Expire

86400 ;Minimum TTL

)

IN NS dlp.server.world.

IN A 192.168.11.56

IN MX 10 dlp.server.world.

dlpIN A 192.168.11.56