DNS server configuration under RHEL5.7

Source: Internet
Author: User
Tags domain server nameserver
In fact, the DNS under RHEL5 is neither simple nor complex, but the DNS File Location of RHEL4 is quite different. However, after several days of painstaking research, the hard bone was finally cracked down. DNS servers in Linux are divided into the following types: 1. The primary function of the cache Domain Name Server is to provide a cache for domain name resolution. 2. The primary Domain Name Server is the authoritative information source for all information in a specific domain, the Primary Domain Name Server is unique for a specified domain

In fact, the DNS under RHEL5 is neither simple nor complex, but the DNS File Location of RHEL4 is quite different. However, after several days of painstaking research, the hard bone was finally cracked down.
DNS servers in Linux are divided into the following types:

1. cache Domain Name Server
The main function is to provide domain name resolution Cache
2. Primary Domain Name Server
Is the authoritative information source for all information in a specific domain. For a specified domain, the Primary Domain Name Server exists only. The primary Domain Name Server saves the regional files of the specified domain.
3. Slave Domain Name Server
Obtain the corresponding files from the primary domain server and save them.

Step 1: Check whether Bind and caching-nameserver software packages are installed.
Rpm-qa | grep bind
Rpm-qa | grep caching

Bind is the installation package of DNS, and caching-nameserver is the configuration template of DNS.

Step 2: Check and configure the DNS configuration file

Domain cache file of DNS:/etc/named. caching-nameserver.conf

DNS region configuration file:/etc/named. rfc1912.zones

Working directory of DNS:/var/named is used to save the domain name region file of the bind server

DNS Startup Script:/etc/init. d/used to control the start and stop of the bind Service

Note:In the RHEL5 DNS file, it is very important! If the chroot package is installed, only the DNS files in this folder will take effect. That is to say, you can only modify the files under this directory to change the DNS configuration! The files outside this folder, although with the same name, are only symbolic links to the files in this folder! To configure DNS, check whether the symbolic link is correct!

Check the ing between/etc/named. caching-nameserver.conf to see if it corresponds to files under/var/named/chroot/etc.
Ll | grep namedIf the ing is incorrect or there is no ing, you must configure it in the/var/named/chroot/etc directory. Otherwise, the configuration will not take effect. If the system reports an error when running the service that the named. conf file does not exist, you can change the named. caching-nameserver.conf file name to named. conf.
Ln-s/var/named/chroot/etc/named. caching-nameserver.conf/etc/named. conf

Configure the named. caching-nameserver.conf File


 
Note that by default, DNS listening (port 53) and requests can only be enabled on the local lo port, that is, 127.0.0.1, therefore, you must change the above 127.0.0.1 to any or physical NIC address.

View the DNS region configuration file/etc/named. rfc1912.zones
 
Forward resolution of domain name: Convert host domain name to corresponding IP Address
Domain Name reverse resolution: Convert the Host IP address to the corresponding domain name

Among them, named. ca is the list of root domain servers on the Internet, including all major DNS servers on the Internet. Create a forward resolution region and a reverse resolution region, where the master is the main DNS server.

**************************************** ***********
There is a symbolic link in the zone file in RHEL5, that is, the zone and local files in the/var/named directory are all linked to/var/named/chroot/var/named, therefore, you must copy to this directory. You can also create a symbolic link under/var/named. The command is
Ln-s/var/named/chroot/var/named/hujw.com. zone/var/named/hujw.com. zone
Ln-s/var/named/chroot/var/named/hujw.com. rev/var/named/hujw.com. rev

View symbolic links:
**************************************** ***********

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.