DNS服务器配置

导读 DNS(Domain Name Server,域名服务器)是进行域名(domain name)和与之相对应的IP地址 (IP address)转换的服务器。DNS中保存了一张域名(domain name)和与之相对应的IP地址 (IP address)的表,以解析消息的域名。下面就由我给大家简单说一下DNS服务器的配置。

dns-88990

主文件配置

定义DNS主文件/etc/named.rfc1912.zones,在后面加入下面几行:

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

zone "6.1.10.in-addr.arpa" IN{
    type master;
    file "supsun.com.local";
    allow-update{ none };
};
正向解析文件配置/strong>
[root@localhost named]# cat supsun.com.zone
$ TTL   86400
@       IN            SOA          dns.supsun.com. root.supsun.com.   (
                                              1997022700 ; Serial
                                              28800      ; Refresh
                                              14400      ; Retry
                                              3600000    ; Expire
                                              84600)     ; Minimum
@       IN            NS          dns.supsun.com.
dns     IN            A           10.1.6.250
@       IN            MX 5        main.supsun.com.
main    IN            A           10.1.6.250
反向解析文件配置
[root@localhost named]# cat supsun.com.local
$ TTL   86400
@       IN            SOA          dns.supsun.com. root.supsun.com.   (
                                              1997022700 ; Serial
                                              28800      ; Refresh
                                              14400      ; Retry
                                              3600000    ; Expire
                                              84600)     ; Minimum
@       IN            NS          dns.supsun.com.
250     IN            PTR         dns.supsun.com.
@       IN            MX 5        main.supsun.com.
250     IN            PTR         main.supsun.com.
DNS/IP名称解析伺服器
[root@localhost ~]# cat /etc/resolv.conf
nameserver 10.1.6.250
search supsun.com

本文原创地址:<a href="http://www.linuxprobe.com/dns-server-setup.html"

posted @ 2016-06-13 12:02  冯琪  阅读(288)  评论(0编辑  收藏  举报