Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build DNS Services for CentOS7

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to build DNS services in CentOS7". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

An introduction to DNS Overview 1

DNS, namely domain name resolution, is a service that points the domain name to the website space IP, so that people can easily access the website through the registered domain name. The IP address is the digital address that identifies the site on the network. In order to facilitate memory, the domain name is used instead of the IP address to identify the site address. Domain name resolution is the process of translating domain names to IP addresses. The domain name resolution is done by the DNS server.

Domain name resolution is also known as domain name pointing, server settings, domain name configuration, reverse IP registration, and so on. To put it simply, the easy-to-remember domain name is resolved to IP, and the service is completed by the DNS server, which resolves the domain name to an IP address, and then binds a subdirectory to the domain name on the host of the IP address.

The address in the Internet is the IP address of a number, and the function of domain name resolution is mainly to facilitate memory.

2 function

The function of DNS system in the network is to maintain an address database, which records the corresponding relationship between various host domain names and IP addresses, in order to provide forward or reverse address query services for client programs, that is, forward resolution and reverse resolution.

Forward resolution: look up the IP address according to the domain name, and resolve the specified domain name to the corresponding IP address.

Reverse resolution: look up the domain name according to the IP address, and resolve the specified IP address to the corresponding domain name.

3 system types

Cache domain name server: also known as cache server, which obtains the domain name and IP address records by querying other domain name servers, and then caches the domain name query results locally to improve the speed of repeated queries.

Primary domain name server: the official server of a specific DNS region, which is unique. Responsible for maintaining the mapping records of all domain names and IP addresses in this area.

Slave domain name server: also known as the secondary domain name server, the domain name and IP address records maintained by the slave domain name server come from the primary domain name server.

4 BIND (the most widely used DNS program that provides domain name services) configuration file

/ etc/named.conf-- main configuration file

/ etc/named.rfc1912.zones- zone profile

/ var/named/named.localhost- zone data configuration file

Two forward analysis

1 networking, download and install BIND service program from yum warehouse

2 check the ip address, enter the main configuration file for configuration, and save and exit after configuration.

3 enter the configuration of the regional configuration file, and save and exit after the configuration is completed.

4 enter the area data file for configuration

The zone data file is in the / var/named directory, where the configuration file for the new domain has not been automatically generated. We need to create a file whose name is defined in the zone configuration file and must be exactly the same. The creation method can copy a copy of the template to rename, that is, the name of the data profile defined by the template in the zone profile, named.localhost. Note that the permissions are consistent after replication, so use the cp-p command.

5 change the original DNS server IP address in / etc/resolv.conf to native IP address

6 complete the configuration, turn off the firewall and enhanced security functions, and start the service. To resolve the three written domain names, you can use the host command.

Three reverse parsing

The main configuration file has been set up before, so you only need to set the zone profile and the zone data profile.

1 set up the regional profile

2 set the region data configuration file in the same way as forward parsing the area data configuration file

3 setup is complete, restart the service for reverse resolution

Four master-slave synchronization

The zone data file of the slave server in the master-slave synchronization is downloaded from the master server. The name of the file can be defined by itself and does not have to be the same as that in the master server, but it should be noted that the named service runs as a user named "named" by default, so make sure that the named user has write permission to the storage directory.

1 the slave server configures the master profile as well as the master service

2 configure area profile

3 configure the zone profile in the primary server

4 disable the slave server firewall, enhanced function, restart the service, and check whether there is a zone data configuration file in the slavers directory.

5 change the DNS server address and test the parsing

This is the end of the content of "how to build DNS Services for CentOS7". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report