호스트 도메인에 대한 DNS 서버 생성

호스트 도메인에 대한 DNS 서버 생성

도메인 설정을 위한 DNS 서버를 만들고 싶습니다.

예를 들어, 도메인이 서버를 가리키고 아파치 가상 호스트를 로드할 때 각 도메인 ns1.domain1.com에 이를 설정 하고 싶습니다 .ns2.domain1.com

CentOS 8에서 다음을 시도했지만 다음 단계를 모르겠습니다.

명명된 구성 파일

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; };
allow-transfer  { none; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;

/* 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";
};
zone "aradteam.tk" IN {
   type master;
   file "forward.unixmen";
   allow-transfer { 195.248.242.31; };
};

zone "242.248.195.in-addr.arpa" IN {
   type master;
   file "reverse.unixmen";
   allow-transfer { 195.248.242.31; };
 };

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

앞으로.unixmen

$TTL 3H
@   IN SOA  @ hostmaster.aradteam.tk. (
                0   ; serial
                3H  ; refresh
                1H  ; retry
                1W  ; expire
                3H )    ; minimum
@            IN   NS     ns1.aradteam.tk.
@            IN   NS     ns2.aradteam.tk.
@            IN   A      195.248.242.31
@            IN   MX     10 host2.aradteam.tk.
@            IN   MX     20 host3.aradteam.tk.
ns1          IN   A      195.248.242.31
ns2          IN   A      195.248.242.31
host1        IN   A      195.248.242.31
host2        IN   A      195.248.242.31
host3        IN   A      195.248.242.31
www          IN   CNAME  aradteam.tk.
mail         IN   CNAME  host2.aradteam.tk.
gopher       IN   CNAME  host3.aradteam.tk.
aradteam.tk. IN   TXT    "v=spf1 ip4:203.0.113.42 include:_spf.google.com ~all"

reverse.unixmen

$TTL 3H
@   IN SOA  @ hostmaster.aradteam.tk. (
                2    ; serial
                3H   ; refresh
                1H   ; retry
                1W   ; expire
                3H ) ; minimum
@        IN    NS    ns1.aradteam.tk.
@        IN    NS    ns2.aradteam.tk.
31        IN    PTR   ns1.aradteam.tk.
31        IN    PTR   ns2.aradteam.tk.

관련 정보