In fact, the domain name resolution Server adds its own authoritative domain resolution based on the DNS Cache Server.
This blog post will show you how to turn a DNS cache server into a domain name resolution server. If you are not familiar with the DNS Cache Server, refer to my previous blog post: cainiao also uses DNS to configure the DNS Cache Server.
Start Configuration:
Edit the named. conf file and add the following content:
# Vi/usr/local/named/etc/named. conf
# Add the resource file of the authoritative domain xiaocui.com in charge of the local DNS
Zone "xiaocui.com" IN {
Type master;
File "xiaocui.com. zone ";
Allow-update {none ;};
};
# Add the reverse resource file of the authoritative domain xiaocui.com in charge of the local DNS
Zone "1.168.192.in-addr. arpa" IN {
Type master;
File "xiaocui.com. rev ";
Allow-update {none ;};
};
Enter the resource file directory.
# Cd/usr/local/named/dns/zone/
Create a forward resolution file for xiaocui.com.
# Vi xiaocui.com. zone
Add the following content:
$ TTL 86400
@ In soa xiaocui.com. root.xiaocui.com .(
1053891162; serial (d. adams)
3 H; refresh
15 M; retry
1 W; expiry
1D); minimum
In ns xiaocui.com.
In a 192.168.1.10
Www in a 192.168.1.100
Create a reverse resolution file for xiaocui.com.
# Vi xiaocui.com. rev
Add the following content:
$ TTL 86400
@ In soa xiaocui.com. root.xiaocui.com .(
20031001; Serial
7200; Refresh
3600; Retry
43200; Expire
86400); Minimum
In ns xiaocui.com.
10 in ptr xiaocui.com.
100 in ptr www.xiaocui.com.
After updating the configuration file and resource file, run the rndc command to re-load all the files.
#/Usr/local/named/sbin/rndc-s localhost reload
Check the system log to determine whether the new information is correctly loaded by bind9. If the following content appears, it indicates that the loading is successful.
# Tail/var/log/messages
Oct 25 01:33:11 localhost named [3193]: reloading configuration succeeded
Oct 25 01:33:11 localhost named [3193]: zone 1.168.192.in-addr. arpa/IN: loaded serial 20031001
Oct 25 01:33:11 localhost named [3193]: zone xiaocui.com/IN: loaded serial 1053891162
Oct 25 01:33:11 localhost named [3193]: reloading zones succeeded
Use nslookup for testing. If you find the IP address www.xiaocui.com, the configuration is successful.
This article is from the blog "the path to growth of Cui"