CentOS6.4部署DNS服务器的记录
Admin 2023-05-04 群英技术资讯 499 次浏览
系统环境:CENTOS6.4
1、安装软件:
yum install bind -y
2、配置,编辑完成以后的主配置文件内容如下:
[root@centos64 yum.repos.d]# cat /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 { 193.168.120.91; };
//listen-on-v6 port 53 { ::1; }; #此处须注释掉,否则在IPV4的网络环境下,添加反向解析以后,DNS服务不能启动
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 no; #此处将yes改为no,否则转发解析互联网的域名失败
dnssec-validation no; #此处将yes改为no,否则转发解析互联网的域名失败
/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.ca";
};
include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
zone "bcdgptv.com" IN {
type master;
file "named.bcdgptv.com";
};
zone "120.168.193.in-addr.arpa" IN {
type master;
file "named.193.168.120";
};
正向和反向的DNS解析文件如下,注意,须从左至右,左边不能留有空格,顶着左边书写,否则服务不能启动
[root@centos64 named]# pwd
/var/named
[root@centos64 named]# ls
data dynamic named.193.168.120 named.bcdgptv.com named.ca named.empty named.localhost named.loopback slaves
[root@centos64 named]# cat named.bcdgptv.com
$TTL 3H
@ IN SOA centos64.bcdgptv.com. admin@bcdgptv.com(
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS centos64.bcdgptv.com.
centos64 IN A 193.168.120.91
@ IN MX 10 cos64.bcdgptv.com.
cos64 IN A 193.168.120.69
abcdefgh IN CNAME centos64
racnode1 IN A 193.168.120.71
[root@centos64 named]# cat named.193.168.120
$TTL 3H
@ IN SOA centos64.bcdgptv.com. admin@bcdgptv.com (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
@ IN NS centos64.bcdgptv.com.
@ IN MX 10 cos64.bcdgptv.com
91 IN PTR centos64
69 IN PTR cos64
71 IN PTR racnode1
客户端查询验证:
[root@racnode1 BACKUP-1]# nslookup
> cos64.bcdgptv.com
Server: 193.168.120.91
Address: 193.168.120.91#53
Name: cos64.bcdgptv.com
Address: 193.168.120.69
> abcdefgh.bcdgptv.com
Server: 193.168.120.91
Address: 193.168.120.91#53
abcdefgh.bcdgptv.com canonical name = centos64.bcdgptv.com.
Name: centos64.bcdgptv.com
Address: 193.168.120.91
> set type=mx
> bcdgptv.com
Server: 193.168.120.91
Address: 193.168.120.91#53
bcdgptv.com mail exchanger = 10 cos64.bcdgptv.com.
> www.sina.com.cn
Server: 193.168.120.91
Address: 193.168.120.91#53
Non-authoritative answer:
www.sina.com.cn canonical name = spool.grid.sinaedge.com.
Authoritative answers can be found from:
sinaedge.com
origin = ns1.sinaedge.com
mail addr = null.sinaedge.com
serial = 20100707
refresh = 10800
retry = 60
expire = 604800
minimum = 60
A记录,别名,MX记录等均能正常查询,互联网的查询也能正常转发,服务部署成功
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:mmqy2019@163.com进行举报,并提供相关证据,查实之后,将立刻删除涉嫌侵权内容。
猜你喜欢
解压命令unzip常用方法汇总:1、把文件解压到当前目录下unzippythontab com zip2、如果要把文件解压到指定的目录下,需要用到-d参数。unzip
不少朋友都在使用SCO Unix操作系统,但因为操作系统本身的缺陷会导致各种问题的出现,如果加强安全管理解决这个问题呢?下面让小编来给大家说说。
在linux中,h文件是系统中的头文件,一般用于存放一些重复使用的代码,如函数声明、变量声明、常数声明、宏的定义等等;头文件是一种文本文件,使用文本编辑器编辑完成后,以扩展名“.h”保存即可。
linux的进程调度发生的情况:1、进程状态转换的时刻,进程终止、进程睡眠,进程要调用“sleep()”或“exit()”等函数进行状态转换,这些函数会主动调用调度程序进行进程调度;2、当前进程的“current->counter=0”时,进程的时间片是由时钟中断来更新的;3、当设备驱动程序执行长而重复的任务时,直接调用调度程序;4、进程从中断、异常及系统调用返回到用户态时。
CentOS服务器下nginx服务器多域名配置
成为群英会员,开启智能安全云计算之旅
立即注册Copyright © QY Network Company Ltd. All Rights Reserved. 2003-2020 群英 版权所有
增值电信经营许可证 : B1.B2-20140078 粤ICP备09006778号 域名注册商资质 粤 D3.1-20240008