Linux DNS cache server and forward and backward zone configuration

Source: Internet
Author: User

DNS cache server

Experimental Machine IP 192.168.1.202

First of all:

1. Yum install bind bind-libs bind-utils-y download package Installation

2. cp/etc/named.conf /etc/named.conf.bak Copy a configuration file

3. Vim named.conf into the configuration file

(within the red box is the place to add or modify)

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8A/DF/wKioL1g-RjOzq0VIAAAsQzbD7wQ200.png "title=" 1.png " alt= "Wkiol1g-rjozq0viaaasqzbd7wq200.png"/>

Then save and exit.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8A/DF/wKioL1g-RqPRM0ApAABDGxsJ7Sg724.png "title=" 2.png " alt= "Wkiol1g-rqprm0apaabdgxsj7sg724.png"/>

Forward Zone resolution:

    1. Vim/etc/named.rfc1912.zones Enter the file to add the following items

650) this.width=650; "src=" Http://s2.51cto.com/wyfs02/M01/8A/E0/wKioL1g-TmDSrrQpAAAUGT2luZQ850.png "title=" 5.png " alt= "Wkiol1g-tmdsrrqpaaaugt2luzq850.png"/>

2. Create a file within the/var/named/folder Lantern.com.zone

Vim Lantern.com.zone Enter the following

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8A/E0/wKioL1g-TtHR6-tpAAA7tCywRJE601.png "title=" 3.png " alt= "Wkiol1g-tthr6-tpaaa7tcywrje601.png"/>

Then check if there are any problems.

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M02/8A/E0/wKioL1g-TuqyYBU7AAAXBQusOLc992.png "title=" 4.png " alt= "Wkiol1g-tuqyybu7aaaxbqusolc992.png"/>

See the OK word is correct.

Next, modify the permissions of the Lantern.com.zone file to belong to the group. Modify to the same as other files.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8A/E0/wKioL1g-T8uiK0b-AAA339ai2LM139.png "style=" float: none; "title=" 6.png "alt=" Wkiol1g-t8uik0b-aaa339ai2lm139.png "/>

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8A/E3/wKiom1g-T8yhBRELAAA1fkHhDYk557.png "style=" float: none; "title=" 7.png "alt=" Wkiom1g-t8yhbrelaaa1fkhhdyk557.png "/>

The next step is to restart the service. 650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M00/8A/E4/wKiom1g-U_qBavDEAAAVIV37vVU285.png "title=" 8.png " alt= "Wkiom1g-u_qbavdeaaaviv37vvu285.png"/>

That's all the prep work. If it's correct, you can test it.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8A/E0/wKioL1g-VHejxO6zAAB2nRo6a2E921.png "title=" 9.png " alt= "Wkiol1g-vhejxo6zaab2nro6a2e921.png"/>

is polling can see

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/8A/E0/wKioL1g-VTqCa0idAABd7VJRqRw699.png "title=" 10.png "alt=" Wkiol1g-vtqca0idaabd7vjrqrw699.png "/>

The following are queries with NS and MX.

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M01/8A/E4/wKiom1g-Vi3D-iifAAB4BlJhzD8601.png "style=" float: none; "title=" 11.png "alt=" Wkiom1g-vi3d-iifaab4bljhzd8601.png "/>

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8A/E0/wKioL1g-Vi7x1jMmAACNdw378F8922.png "style=" float: none; "title=" 12.png "alt=" Wkiol1g-vi7x1jmmaacndw378f8922.png "/>

The above is the forward

The following is the reverse

    1. Vim/etc/named.rfc1912.zones Add the following items after entering the file

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M02/8A/E4/wKiom1g-V7ORBkddAAAT6709aC8875.png "title=" 13.png "alt=" Wkiom1g-v7orbkddaaat6709ac8875.png "/>

2. Create a 192.168.1.zone file within the/var/named/

Vim 192.168.1.zone Add some content inside

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M00/8A/E0/wKioL1g-W27AX71WAAA2zsi-XpU766.png "title=" 14.png "alt=" Wkiol1g-w27ax71waaa2zsi-xpu766.png "/>

Then save the exit. The file is then checked for errors.

Named-checkconf

Named-checkzone "192.168.1.zone"/var/named/192.168.1.zone

The next step is to modify the permissions of this file and the group

650) this.width=650; "src=" Http://s4.51cto.com/wyfs02/M01/8A/E0/wKioL1g-XHDxTtoAAAA9Oc9k3B0999.png "title=" 15.png "alt=" Wkiol1g-xhdxttoaaaa9oc9k3b0999.png "/>

Then restart the service

650) this.width=650; "src=" Http://s5.51cto.com/wyfs02/M02/8A/E4/wKiom1g-XLvBhr2HAAAM1VVTY-M044.png "title=" 16.png "alt=" Wkiom1g-xlvbhr2haaam1vvty-m044.png "/>

Here is the test

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/8A/E4/wKiom1g-Ys2gFLoWAAA3j984m0c475.png "title=" 17.png "alt=" Wkiom1g-ys2gflowaaa3j984m0c475.png "/>

650) this.width=650; "src=" Http://s1.51cto.com/wyfs02/M01/8A/E4/wKiom1g-Z9_SG8URAABpqw9NDxY822.png "title=" 18.png "alt=" Wkiom1g-z9_sg8uraabpqw9ndxy822.png "/>

These are all the results of the experiment.


Linux DNS cache server and forward and backward zone 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.