Introduction to BIND service (NDS) of Linux system
:
DNS Domain Name System is a service used to resolve the correspondence between domain names and IP addresses. Functionally, it can realize forward resolution and reverse resolution:
- Forward resolution: Find the corresponding IP address according to the host name (domain name).
- Reverse resolution: Find the corresponding host name (domain name) according to the IP address.
The work form is divided into master server, slave server and cache server.
Main server: It is unique in a specific area and is responsible for maintaining the corresponding relationship between domain names and IP addresses in this area.
Slave server: Obtain the corresponding relationship between the domain name and the IP address from the master server and maintain it to prevent the master server from going down.
Cache server: Obtain the correspondence between domain names and IP addresses by querying other domain name resolution servers to improve the efficiency of repeated queries.
1.rpm -qa | grep '^bind' //View the installation package
2.yum install bind*//Install the bind service
3.systemctl start named.service //Start the service
4.netstat -utlnp | grep named //View the service Port
5.rpm -ql bind-9.9.4-50.el7.x86_64 //View the path generated during installation
6.vim /etc/named.conf //Modify the main file
7. Add a configuration area
8. Depending on the version of the installation system, the forward and reverse parsing file directory will change.
cd /var/named
cp named.localhost linuxma.com.zone
cp named.localhost 192.168.227.zone
Vim /etc/named.conf
vim linuxma.com.zone
vim 192.168.227.zone
Note:
AAAA: for IPV6 address
NS : Name service (domain name)
A: Corresponding IP (V4)
CNAME : Modify connection name
MX: Mail exchange uses
forward resolution domain name --- IP
reverse resolution IP ---- domain name
9. Restart the service
systemctl restart named.service
10. Close the firewall
systemctl stop firewalld.service
11. Configure this level DNS
vim /etc/resolv.conf
12. Verify test
nslookup ----linuxma.com
dig -t ns linuxma.com