RHE5 Server management set up a DNS server step description [graphic]_DNS server

Source: Internet
Author: User
Tags domain name server domain server name database nameserver reverse dns

First, DNS primary configuration file

A list file for a/etc/hosts-host-contains a list of known hosts (on the local network) if the system's IP is not dynamically generated, it can be used for simple host name resolution (dot notation
/etc/host.conf-Conversion Program control file-tells the network domain name server How to find the host (usually/etc/hosts, then the domain name server, which can be changed by netconf)
/etc/resolv.conf-Converter Profile-When the configuration program requests the BIND domain Query service to query the host name, you must tell the program which domain name server and IP address to use to complete this task

Second, the named configuration file family

/etc/named.conf-Primary file-sets the generic name parameter to point to the information source for the domain database used by the server
/var/named/named.ca-root Domain Configuration server point to file-point to root domain Configuration server to tell cache server initialization
/var/named/localhost.zone-localhost zone forward domain resolution file-used to convert localhost to local loopback address (127.0.0.1)
/var/named/name.local-localhost reverse Domain Name resolution file-for converting 127.0.01 to localhost
/var/named/name2ip.conf-a forward resolution file in the user's configuration area-a zone file used to map the host name to an IP address
/var/named/2ipname.conf-the User Configuration area's orientation resolution file-a zone file used to map IP addresses to host names

Third, install the BIND domain name server Software

#yum Install bind-9.3.3-7.e15.i386.rpm
#yum Install caching-nameserver-9.3.3-7.e15.i386.rpm
#yum Install bind-chroot-9.3.3-7.e15.i386.rpm

Iv. DNS Classification

1. High-speed storage domain Name server
But the high-speed storage domain Name server does not contain the domain name database, it from a remote server to obtain the name of the server query information, once the answer, it put it into the cache, the next query the same information used to answer
2. primary Domain Name server
The primary domain name server is the authoritative source for all information in a particular domain, and it loads domain information from a local file constructed by a domain administrator. The primary domain name server needs to configure a complete set of files, that is, the primary configuration file (/etc/named.caching-nameserver.conf), the forward domain file (/var/named/named.zero), the area file of the directional field (/var/named /named.hosts), Cache initialization files (named.ca), and loopback files (named.local).
3. Secondary domain Server
The secondary domain name server is used to transfer a full range of domain information from the primary domain name server, which is an optional configuration option. The zone files are transferred from the primary domain name server and are saved as disk files in the secondary domain name server. The secondary domain name server does not need to configure the local file, just configure the primary configuration file, cache initialization files, and loopback files.

V. Configure a DNS server for sina.com domain names, you must first configure the IP address of this computer

Note: This bind9 allows all configurations to be in the directory/var/named/chroot/var/named directory in chroot mode, and if BIND9 is running in non-chroot (normal) mode, all configurations are in the directory/var/named
A, is to the main area (the Domain name resolution IP address):
1. Modify the DNS server master configuration file
#vi/etc/named.caching-nameserver.conf Modify the following lines:
Listen-on Port 53 {192.168.20.1;}; Monitor native port 53 (IPV4)
# Listen-on-v6 Port 53 {:: 1;}; Disable native port 53 (IPV6)
# allow-query {localhost;}; Turn off only native query
# match-clients {localhost;}; Turn off matching clients as native



2, modify the DNS zone declaration storage file

#vi/etc/named.rfc1912.zones
Declare Domain name Area information:



Zone: Represents an area
In: Start definition
Type master//defined as primary DNS
File "Sina.zone"; Data files that define the Sina domain name
allow-update {none;}//define hosts that are allowed to be updated
Each line must end with A; semicolon {none;}: There must be spaces on both sides of the curly braces

3, the definition of data files:
#cd/var/named/chroot/var/named
#cp –p named.local Sina.zone
#vi Sina.zone



4, detection of the region file syntax error:



5, change the area file all groups:



6, start the DNS server:
#service named restart//restart the DNS service
#rndc Reload//Reload key



7, test DNS:



<B> Reverse Primary Zone (resolve domain name with IP address)
The structure and format of the reverse parsing zone file is similar to that of a zone file, except that its primary content is to establish a pointer PTR resource record that maps IP addresses to DNS domain names.

1, modify the DNS zone declaration storage file
#vi/etc/named.rfc1912.zones
To declare domain name area information, add the following five elements:



2. Define the reverse zone data file:



#vi sina.local//Modify the Sina.local file as follows:



3, change the area file all groups:



4, start the DNS server:

#service named restart//restart the DNS service
#rndc Reload//Reload key



5, reverse DNS resolution verification:



<C> Forward secondary Zone
One Windows2003 server configures DNS primary zone:
Win2003 's IP address is: 192.168.20.2
DNS domain name: huayu.com



To configure a secondary zone for huayu.com domain names on a Linux server:

1, modify the DNS zone declaration storage file
#vi/etc/named.rfc1912.zones
To declare domain name area information, add the following five elements:

2. Allow database directory Write permissions for primary DNS:

3, start the DNS server:
#service named restart//restart the DNS service
#rndc Reload//Reload key

4, Reverse DNS resolution verification:
Since the system will produce the zone data file Huayu.zone



To test DNS resolution:



The www.huayu.com data file in automatic learning Win2003 is named Huayu.zone in the/var/named/chroot/var/named directory, and this area file is automatically generated.

<D> Reverse Secondary Zone
1. The practice is the same as positive auxiliary area.
2, must delete/etc/named.rfc1912.zones files in the original reverse definition, because a DNS server on the network segment can only have a reverse resolution zone.

<E> Forwarding DNS servers
Add one row to the DNS master profile/etc named.caching-nameserver.conf: forwarders {192.168.20.2;};
#vi/etc/named.caching-nameserver.conf



Note: When a DNS server query resolves all of the server's zones, it is forwarded to 192.168.20.2 server resolution.

<F> Configuring DNS server subdomains
1, authorizing subdomains in parent domain DNS servers

#vi/var/named/chroot/var/named/sina.zone adds the next two lines, Specifies the BJ child domain and the BJ child domain DNS server IP address.



2, setting the bj.sina.com domain DNS server
Configuration method and the parent DNS server in another DNS server, except that the domain name is bj.sina.com.

# vi/etc/named.rfc1912.zones



#vi/var/named/chroot/var/named/bj.sina.zone



This article is from: http://lonay.blog.51cto.com/872125/192869 

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.