CentOS 6.5 搭建自定义 DNS 服务器

yum install bind bind-chroot bind-libs bind-utils

vi /etc/named.conf

options {

// listen-on port 53 { 127.0.0.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”;

allow-query { any; };

recursion yes;


dnssec-enable yes;

dnssec-validation yes;

dnssec-lookaside auto;


/* Path to ISC DLV key */

bindkeys-file “/etc/named.iscdlv.key”;


managed-keys-directory “/var/named/dynamic”;

};


vi /etc/named.rfc1912.zones

zone “mx.local” IN {

type master;

file “zone.mx.local”;

allow-update { none; };

};


zone “1.168.192.in-addr.arpa” IN {

type master;

file “zone.arpa.mx.local”;

allow-update { none; };

};


vi /var/named/zone.mx.local

$TTL 86400

@ IN SOA ns.mx.local. root.mx.local.(

0;

3H;

1H;

1W;

0);


@ IN NS ns.mx.local.

ns IN A 192.168.1.248

ur IN A 192.168.1.248

w2 IN A 192.168.1.248


vi /var/named/zone.arpa.mx.local

$TTL 86400

@ IN SOA ns.mx.local. root.mx.local. (

0;

3H;

1H;

1W;

0);


@ IN NS ns.mx.local.

248 IN PTR ur.mx.local.

248 IN PTR w2.mx.local.


你可能感兴趣的:(CentOS 6.5 搭建自定义 DNS 服务器)