RedHat8.0 server configuration solution (DNS)

Source: Internet
Author: User
RedHat8.0 server configuration solution (DNS)-Linux Enterprise Application-Linux server application information. For details, refer to the following section. 1.1 Introduction


The most basic service in TCP/IP networks is domain name resolution. That is, you can access your website through IP address or URL. In addition, domain name resolution should also provide user naming services.



1.2 Required System Resources


Install bind-9.2.1-9 and caching-nameserver-7.2.-4. noarch. rpm


1.2.1 configuration file:


File Name and Source

/Etc/named. conf caching-nameserver-7.2.-4. noarch. rpm

/Etc/hosts system comes

/Etc/host. conf system comes

/Etc/resolv. conf system comes

/Etc/nsswitch. conf glibc-2.2.93-5

/Var/named. local caching-nameserver-7.2.-4. noarch. rpm

/Var/named. ca caching-nameserver-7.2.-4. noarch. rpm

/Var/named/name2ip. conf (/var/named/realer.com In the instance) Administrator created

/Var/named/ip2name. conf (/var/named/192.168.0 In the instance) Administrator created


1.2.2 related tools:


File Name Source

/Etc/rc. d/init. d/named bind-9.2.1-9

/Usr/bin/nslookup bind-9.2.1-9

/Usr/sbin/rndc Binary-9.2.1-9



1.3 configuration Scheme


The configuration of the DNS server involves five main files, and four other files are also related to DNS:


1./etc/named. conf configuration file


Role: defines the basic parameters and source points of the domain database information. The file can be stored locally or remotely on the server.


Instance:


$ ORIGIN realer.com.

@ In soa mail hostmaster @ realer (

# All partition files start with SOA. @ specifies the current information source. The value of realer.com can connect the domain name and named. conf. There is usually only one @ symbol.

1997022700; Serial

# Serial number

28800; Refresh

# Refresh cycle, in seconds

14400; Retry

# Cycle

3600000; Expire

# Abort time

86400); Minimum

# Time-to-live time

# The above configurations must be consistent with those in named. local.

@ In ns realer.com.

# Define a Domain Name Server

@ In mx 10 realer.com.

# Define the email server. "10" indicates the priority. The smaller the value, the higher the priority.

@ In a 192.168.0.1

Localhost in a 127.0.0.1 # map domain to IP Address

Www1 in cname www

# The two names before and after CNAME are equivalent names

Www in a 192.168.0.1

Test in a 192.168.0.2

Comp in cname test


3./var/named/192.168.0 reverse parsing File


Purpose: Implement domain name ing of IP addresses


Instance:

@ In soa gradmail.phy.pku.edu.cn.

Hostmaster@gradmail.phy.pku.edu.cn .(

1997022700; serial

28800; refresh

14400; retry

3600000; expire

86400); minimum

@ In ns realer.com.

1 in ptr realer.com.

1 in ptr www.realer.com.

1 in ptr www1.realer.com.

2 in ptr test.realer.com.

2 in ptr comp.realer.com.

# Define the inverse relationship between 192.168.0.1 and www.realer.com

Can also be used to define a reverse domain.


4./var/named. local host parsing File


Purpose: Resolve the return address localhost, Which is 127.0.0.1. The return address is a special convention that allows you to process the local address in the same way as the remote address, this simplifies the processing process and does not necessarily send data to the physical network.


Instance:

$ TTL 86400

@ In soa localhost. root. localhost .(

1997022700; Serial

28800; Refresh

14400; Retry

3600000; Expire

86400); Minimum

In ns localhost.


1 in ptr localhost.


5./var/named. ca clue File


Purpose: Initialize the buffer information. This file does not need to be changed by the administrator, but comes with the system.


6./etc/hosts


Purpose: map to other major computers on the Internet. It is usually used as a DNS backup. That is to say, the Hosts table is used when the DNS system encounters a problem.


Instance:

127.0.0.1 localhost. localdomain localhost

192.168.0.1 www.realer.com www


# Since each server has several domain names that correspond to IP addresses permanently, they should be stored in the Hosts table.


7./etc/resolv. conf


Purpose: Specify the IP address and search sequence of the Domain Name Server.


Instance:

Domain

# Define a local domain name.

Search realer.com

# Simplify the host name entered by the user, that is, when the user inputs www, the DNS can successfully resolve it to www.realer.com. It is mutually exclusive with the domain, and is used to define the search list no matter who outputs it.

Nameserver 192.168.0.1

# Define the IP address of the Domain Name Server. A maximum of three IP addresses are allowed. We recommend that you use two IP addresses.


8./etc/hosts. conf


Purpose: implement the relationship and interface between the hosts table and DNS.


Instance:

Order hosts, bind # domain name resolution order

Multi on

# Allow a computer to have multiple IP addresses



9./etc/nsswitch. conf


Role: used to process the Hosts table and DNS Sequence


Instance:

Passwd: files nisplus nis

Shadow: files nisplus nis

Group: files nisplus nis

Hosts: files dns

Bootparams: nisplus [NOTFOUND = return] files

Ethers: files

Netmasks: files

Networks: files

Protocols: files


Rpc: files

Services: files

Netgroup: nisplus

Publickey: nisplus

Automount: files nisplus

Aliases: files nisplus



1.4 test and management methods


1. The administrator needs to execute/etc/rc. d/init. d/named restart after modifying the DNS configuration file to make the change take effect.


2. rndc tool: used to send signals to the named Process


3. nslookup: test whether forward and reverse Parsing is normal.

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.