dns cache server
Experimental machine ip 192.168.1.202
First:
1. yum install bind bind-libs bind-utils -y Download package installation
2. cp /etc/named.conf /etc/named .conf.bak Copy a configuration file
3. vim named.conf Enter the configuration file
(the red box is the place that needs to be added or modified)
Then save and exit.
Forward zone analysis:
vim /etc/named.rfc1912.zones Enter the file and add the following items
2. Create a file lantern.com in the /var/named/ folder. zone
vim lantern.com.zone Enter the following items
and check if there are any problems.
It’s correct when you see the word OK.
Next, modify the permissions and group ownership of the lantern.com.zone file. Just modify it to be the same as other files
The next step is to restart the service.
The above is all the preparation work. If it is correct, you can try it to see if it works. The picture below is polling. You can check it out. The following is query using NS and MX.
The above is the forward direction
The following is the reverse directionvim /etc/named.rfc1912.zones After entering the file, you need to add the following items
2. In /var Create a 192.168.1.zone file in /named/
Then save and exit. Then check the file for errors.
named-checkconf named-checkzone “192.168.1.zone” /var/named/192.168.1.zone If it is correct, the next step is to modify the permissions and group of this file Then restart the serviceThe following is the test
The above are all the experimental results.