美高梅网址服务器搭建
分类:新闻中心

一、安装

[[email protected] named]yum -y install bind //升级安装的包
[[email protected] 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.
//

# yum install -y bind bind-chroot ypbind bind-utils
# rpm -qa |grep bind
 bind-libs-9.3.6-16.P1.el5
 bind-utils-9.3.6-16.P1.el5
 ypbind-1.19-12.el5_6.1
 bind-9.3.6-16.P1.el5
 bind-chroot-9.3.6-16.P1.el5
# yum install -y caching-nameserver-9.3.*   //安装后可启动named
# service named start
# netstat -antup         //TCP 53953端口开放,953提供给rndc工具用来管理DNS服务器

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;

  1.主区域配置

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
};

# cd /var/named/chroot/etc     //以下操作均在此路径下
# cp -p named.caching-nameserver.conf named.conf   //注意加 -p 所属组不变
# cp -p named.rfc1912.zones named.rfc1912.zones_back
# vim named.conf
### 配置内容如下:
options {
        listen-on port 53 { 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";

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};

        // Those options should be used carefully because they disable port
        // randomization
        // query-source    port 53;    
        // query-source-v6 port 53;

zone "." IN {
type hint;
file "named.ca";
};

        allow-query     { any; };
        allow-query-cache { any; };
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
view localhost_resolver {
        match-clients      { any; };
        match-destinations { any; };
        recursion yes;
        include "/etc/named.rfc1912.zones";
};

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

==================================
[[email protected] 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 "linuxidc.com" IN {
type master;
file "linuxidc.com.zone";
};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "1.168.192.zone";

### 结束 ###

};

[[email protected] named]# pwd
/var/named/chroot/var/named
[[email protected] named]#
[[email protected] named]#touch linuxidc.com.zone ( 创建正向数据文件)
[[email protected] named]#touch 1.168.192.zone (创建反向数据文件)
[[email protected]

# vim named.rfc1912.zones
### 配置内容如下:
zone "." IN {
        type hint;
        file "named.ca";
};

named]#vim linuxidc.com.zone

$TTL 86400
@ IN SOA ns.linuxidc.com. root.linuxidc.com. (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
@ IN NS ns.linuxidc.com.
ns IN A 192.168.1.8

zone "laowafang.com" IN {
        type master;
        file "linuxidc.com.zone";
        allow-update { none; };
};

www IN A 192.168.1.8

[[email protected]

zone "146.147.119.in-addr.arpa" IN {
        type master;
        file "linuxidc.com.local";
        allow-update { none; };
};
### 结束 ###

named]#vim 1.168.192.zone

$TTL 86400
@ IN SOA ns.linuxidc.com. root.linuxidc.com. (
1997022700 ; Serial
28800 ; Refresh
14400 ; Retry
3600000 ; Expire
86400 ) ; Minimum
@ IN NS ns.linuxidc.com.
8 IN PTR ns.linuxidc.com.
8 IN PTR www.linuxidc.com.
本篇文章来源于 Linux公社网站 原文链接:

 protected]]() named]yum -y install bind //升级安装的包 [[email protected] named]#vim /etc/named.conf // // named.conf // // Provided by Red Hat bind package to configure the ISC BIND name...

美高梅网址 1

本文由美高梅网址发布于新闻中心,转载请注明出处:美高梅网址服务器搭建

上一篇:没有了 下一篇:没有了
猜你喜欢
热门排行
精彩图文