DNS 域名系统服务器
IP 与 域名之间解析 ;提供分层的域名解析 服务;
bing 伯克利加州大学 应用最广的域名服务系统;
bind 主要分为 主配置文件 和 域数据记录文件
yum 安装:
yum install bind* -y
配置NDS 域名解析
直接添加一下内容:
[root@mail ~]# cat /etc/named.conf
zone "wangxiaojing.com" IN {
type master;
file "wangxiaojing.com.zone";
allow-update{none;};
};
zone "11.168.192.in-addr.arpa" IN {
type master;
file "11.168.192.local";
allow-update{none;};
};
正向解析 配置
[root@mail ~]# cat /var/named/wangxiaojing.com.zone
$TTL 1D
@ IN SOA @ dns.wangxiaojing.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
IN NS dns.wangxiaojing.com.
IN MX 10 dns.wangxiaojing.com.
dns IN A 172.16.2.18
mail IN CNAME dns
pop3 IN CNAME dns
smtp IN CNAME dns
imap4 IN CNAME dns
配置反向解析
[root@mail ~]# cat /var/named/11.168.192.local
$TTL 1D
@ IN SOA @ dns.wangxiaojing.com. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS @
A 127.0.0.1
AAAA ::1
IN NS dns.wangxiaojing.com.
18 IN PTR dns.wangxiaojing.com.
设置开机自启动
chkconfig named on
service named start
配置 /etc/resolv.conf
(重启之后配置会失效)
cat /etc/resolv.conf search wangxiaojing.com
nameserver 172.16.2.18
nameserver 8.8.8.8
nameserver 8.8.4.4
检测 NDS 解析:
[root@mail ~]# nslookup -qt=mx mail.wangxiaojing.com
*** Invalid option: qt=mx
Server: 172.16.2.18
Address: 172.16.2.18#53
mail.wangxiaojing.com canonical name = dns.wangxiaojing.com.
Name: dns.wangxiaojing.com
Address: 172.16.2.18