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

Steps of setting up DNS server under Linux

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

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

This article mainly explains the steps of setting up DNS server under Linux. The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn the steps of setting up DNS server under Linux.

Named, the principal process, needs to read an initialization file when it starts. The default is / etc/named.boot. In addition, it is recommended that you use Linux's own ndc tool to start, abort, restart, refresh DNS data, output DNS data and other debugging. For detailed use of this tool, please refer to the Linux technical documentation.

Step 1: configure and establish named.boot. Because this is the first configuration file to be read by the named process, but this file contains any DNS data by default, which needs to be manually entered to create it. The following is a configuration example:

Directory/var/named

Primary site.com db.site

Primary 0.0.127.IN-ADDR.ARPA db.127.0.0

Primary 56.11.192. IN-ADDR.ARPA db.192.11.56

Sitecache.db.sitecache

The meaning of each line is explained as follows (the file names involved in the example can be drawn up on their own, including the third and fourth lines):

Directory/var/named: specify the path where the named process reads all DNS data files. In this case, the / var/named directory, of course, you can change it.

Primary site.com db.site: use named as the main domain name server of site.com (forward domain name conversion data), and specify that all domain name conversion data in the form of * .site.com be saved in the db.site file.

Two pieces of primary IP data: set named as the translation master server (reverse domain name translation data) of an IP address field (only three digits), while the db.127.0.0 file specifies the 127.0.0.* class IP address to domain name translation data is stored here.

Sitecache.db.sitecache: specifies that named gets the address of the top-level server for the Internet from the db.sitecache file.

Step 2: define each DNS data file based on the named.boot you just configured.

1. The establishment of forward domain name conversion data file db.site, give an example:

@ IN SOA linux.site.com. Root.linux.site.com. (

200410301

28800

7200

3600000

86400)

NS linux.site.com.

MX 10 support.site.com.

Localhost A 127.0.0.1

Sy727 A 192.11.56.24

Sy728 A 192.11.56.25

Linux A 192.11.56.26

Mail MX 10 sy727.site.com.

MX 20 sy728.site.com.

Www CHAME Linux.site.com.

Ftp CNAME Linux.site.com.

Explanation: in the first part, the first line SOA is followed by the DNS server name and administrator email address; the following columns of numbers are used in data exchange and are generally unchanged; the NS line defines the domain name of the domain name server itself; and the MX line defines the corresponding mail server name.

The first four lines of the second part are the record configuration from the DNS domain name to the IP address, which is required; for example, the second line indicates that the IP address corresponding to the sy727.site.com domain name is 192.11.56.24. The two lines guided by MX define mail address translation records, such as converting XXX@mail.site.com to XXX@sy727.site.com. The last two lines are the hostnames that define the application service. In this case, Linux.site.com is used as the host alias for the WWW service and FTP service, that is, you can access www.site.com or ftp.site.com by entering Linux.site.com.

Special note: the hostname of the four lines of MX and CHAME records must end with a period.

Thank you for your reading, the above is the content of "steps for setting up DNS servers under Linux". After the study of this article, I believe you have a deeper understanding of the steps of setting up DNS servers under Linux, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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