ドメイン設定用のDNSサーバーを作成したいと思います。
たとえば、ドメインがサーバーを指してApache仮想ホストをロードするときに、各ドメイン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.