码迷,mamicode.com
首页 > 其他好文 > 详细

rhsl 6.5 搭建DNS服务器

时间:2016-06-10 15:06:04      阅读:141      评论:0      收藏:0      [点我收藏+]

标签:localhost   package   example   服务器   service   

目标:创建区域huhaiqing.com


1、安装bind

yum install -y bind\*
service named start


2、修改主配置/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; };
listen-on-v6 port 53 { any; };
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";
};
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost." IN {
type master;
file "named.localhost";
};
zone "1.0.0.127.in-addr.arpa." IN {
type master;
file "named.loopback";
};
logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};
zone "huhaiqing.com." IN {
type master;
file "huhaiqing.com.hosts";
};
#include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";


3、修改区域配置文件/var/named/huhaiqing.com.hosts

$TTL 86400
@                   IN      SOA     zabbix.huhaiqing.com.  admin.huhaiqing.com.     (
                                                                        2016060901 
                                                                        1H
                                                                        10M 
                                                                        7D
                                                                        1D
                                                                           )
@IN      NS      zabbix
zabbixIN      A       10.13.106.11
ftpserverIN      A       10.13.106.30
pythondevIN      A       10.13.106.35


4、重启服务

service named restart


注意:

ping目标主机时,如果目标主机的格式为:xxx.huhaiqing.com,则ping xxx可以通,否则只能通过ping xxx.huhaiqing.com测试主机是否在线。



rhsl 6.5 搭建DNS服务器

标签:localhost   package   example   服务器   service   

原文地址:http://huhaiqing.blog.51cto.com/6338282/1787751

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!