DNS resolution Configuration

Source: Internet
Author: User

        DNS (domain Name System), the Internet as the domain name andIP Addressone of the mutual mappingsDistributed databaseTo make it easier for users to accessInternet, instead of remembering the number of IP strings that can be read directly by the machine. ThroughHostname, the process of eventually getting the IP address for that hostname is called Domain name resolution (or hostname resolution). The DNS protocol runs onUdpprotocol, use the port number 53.

Next, we will teach you how to configure DNS resolution. There are three types of DNS parsing: Forward parsing, reverse parsing, and bidirectional parsing.

The first thing to do is to fix the environment in the system yum install Bind-y

Next, let the port of service pass through the firewall firewall-cmd--permanent--add-service=dns

                    firewall-cmd--reload

         you need to modify the DNS configuration file/etc/named.conf--> listen-on port.      Monitor all 53 ports

                                                                                                         allow-query {any};        Allow all people to query

                                                                                                         forwarders {Previous-level DNS};     Set the previous level of DNS

After configuration, you need to turn on the service Systemctl start named (if the opening time is too long you can move the mouse or keyboard to speed up the boot speed)


1. Forward parsing

Forward parsing is the IP address resolved by the domain name

We can know in/etc/named.conf the domain configuration file is include/etc/named.rfc1912.zones, then we go to vim/etc/named.rfc1912.zones--> file there are templates, Copy a change. Modify the content for the domain name and file,file for the domain name. Zone (e.g. Isxy2.com.zone).

After the modification in the/var/named/to Named.localhost as a template copy cp-p Named.localhost isxy2.com.zones

The copied files are changed as follows:

650) this.width=650; "title=" Qq20160802143559.png "alt=" wkiol1egp4nqnqtfaab6o3lsahk561.png-wh_50 "src="/HTTP/ S1.51cto.com/wyfs02/m00/85/54/wkiol1egp4nqnqtfaab6o3lsahk561.png-wh_500x0-wm_3-wmp_4-s_2719055140.png "/>

www after not with the domain name is because the file will automatically add you in/etc/named.rfc1912.zones The domain name is set in; MX is mail server.

2. Reverse parsing

Reverse parsing is resolving a domain name with an IP address

The reverse parsing configuration and forward parsing have the following differences:

Write the network bit back when setting the domain name in/etc/named.rfc1912.zones (the original IP should be 172.25.254.x)

650) this.width=650; "title=" Qq20160802145132.png "alt=" wkiom1egqxzqzqnvaaba5ixmoom367.png-wh_50 "src="/HTTP/ S1.51cto.com/wyfs02/m02/85/55/wkiom1egqxzqzqnvaaba5ixmoom367.png-wh_500x0-wm_3-wmp_4-s_734037396.png "/>

The file suffix is ptr 650 when copying in/var/named/) this.width=650; "title=" Qq20160802145412.png "alt=" Wkiol1egq6yqg_ Kuaac0ae1nqby827.png-wh_50 "src=" Http://s2.51cto.com/wyfs02/M02/85/55/wKioL1egQ6yQg_kuAAC0AE1NqbY827.png-wh_ 500x0-wm_3-wmp_4-s_2707932120.png "/>

As with forward parsing, the file automatically adds the network bit you previously set, and the 172.25.254.100 corresponds to www.westos.com

3. Bidirectional parsing

First change the/etc/named.conf file

650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M02/85/72/wKiom1ejet2TGnG_AAB2jePYb5U802.png-wh_500x0-wm_3 -wmp_4-s_2994046059.png "title=" Qq20160802152431.png "alt=" wkiom1ejet2tgng_aab2jepyb5u802.png-wh_50 "/>650" this.width=650; "Src=" http://s1.51cto.com/wyfs02/M00/85/72/wKiom1ejevPgHcN6AAD5d8IZBbw136.png-wh_500x0-wm_3-wmp _4-s_3506014494.png "title=" Qq20160802152447.png "alt=" Wkiom1ejevpghcn6aad5d8izbbw136.png-wh_50 "/>

Then copy cp-p/etc/named.rfc1912.zones/etc/named.rfc1913.zones

650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/85/72/wKioL1eje9Ciaur-AAB5ApAaGUI041.png-wh_500x0-wm_3 -wmp_4-s_2298917939.png "title=" Qq20160805013030.png "alt=" Wkiol1eje9ciaur-aab5apaagui041.png-wh_50 "/>

The allow-transfer here is to do the DNS cluster, just note that the file suffix is Inter

The last copy cp-p/var/named/isyx2.com.zones/var/named/westos.com.inter can be




DNS resolution Configuration

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.