Linux DNS Service

Source: Internet
Author: User

  

Install The bind package First

look at its configuration file and working directory. rpm -qc bind

Where you can see:

/etc/named.conf master configuration file

/etc/named.rfc1912.zones zone configuration file

/var/named/named.ca Locations established by 13 root domain Servers worldwide

Forward parsing

To modify the master configuration file:

650) this.width=650; "title=" DNS master configuration file modified. jpg "src=" http://s3.51cto.com/wyfs02/M02/6B/A9/ Wkiom1uzuhuqe5mkaae82ovn4mm618.jpg "alt=" Wkiom1uzuhuqe5mkaae82ovn4mm618.jpg "/>

To modify a zone configuration file:

650) this.width=650; "title=" DNS zone configuration file modified. jpg "src=" http://s3.51cto.com/wyfs02/M01/6B/A9/ Wkiom1uzue3hi0zpaadh0b0kv74508.jpg "alt=" Wkiom1uzue3hi0zpaadh0b0kv74508.jpg "/>

go to working directory CD /var/named and view ls- l

650) this.width=650; "title=" DNS view working directory. jpg "src=" http://s3.51cto.com/wyfs02/M00/6B/A4/wKioL1Uzu7_ Zkgwraafrzibhrcm122.jpg "alt=" Wkiol1uzu7_zkgwraafrzibhrcm122.jpg "/>

As you can see, the owner and the Group One is Root one is named .

We now need to create the working file in this working directory that we have just set up in the zone configuration file .Benet.com.zone,. However, if you use a method that is created directly, because the user at this time is Root , it makes both the owner and the group Root , which conflicts with the default owner and group of the working file, which can result in unreadable. Therefore, it should be used at this time Reserved rights copy the method.

CP- P named.localhost benet.com.zone

  Then, modify the working file.

650) this.width=650; "style=" width:757px;height:410px; "title=" DNS modify working files. jpg "src=" http://s3.51cto.com/wyfs02/M01/ 6b/a9/wkiom1uzutwtalndaajryjgh5ho732.jpg "width=" 857 "height=" 503 "alt=" wkiom1uzutwtalndaajryjgh5ho732.jpg "/>

The modification becomes this way:

650) this.width=650; "style=" width:785px;height:394px; "title=" DNS working file modified 2.jpg "src=" http://s3.51cto.com/wyfs02/M02 /6b/a9/wkiom1uzuvzcwcggaah51zw4pck770.jpg "width=" 1005 "height=" 365 "alt=" wkiom1uzuvzcwcggaah51zw4pck770.jpg "/ >

To open the named service:

650) this.width=650; "title=" DNS opens named service. jpg "src=" http://s3.51cto.com/wyfs02/M01/6B/A4/ Wkiol1uzvk7qfvznaabzazawdfa146.jpg "alt=" Wkiol1uzvk7qfvznaabzazawdfa146.jpg "/>

shutting down the firewall service iptables stop    and Setenforce 0

  To your own network card is set to DNS, is to set the machine for DNS resolution, redirected to the network card configuration file.

> redirect , overwrite, replace all content directly.

echo "servername 192.168.28.149" >/etc/resolv.conf

  look at the port, TCP agreements and UDP The agreement looks - the case of the port.

 NETSTAT-TNL NETSTAT-UNL

Resolving domain Names host   www.benet.com

        Reverse parsing

Modifying a zone configuration file

650) this.width=650; "title=" DNS reverse Domain name resolution Modify the zone configuration file. jpg "src=" http://s3.51cto.com/wyfs02/M01/6B/A4/ Wkiol1uzvs-if1sbaab-_vrm4t8755.jpg "alt=" Wkiol1uzvs-if1sbaab-_vrm4t8755.jpg "/>

the Benet.com.zone The file is copied directly, as in the previous copy, to keep the county copy.

 Cp-p Benet.com.zone benet.com.local

Then edit the file.

             Master-Slave DNS synchronization

Now you turn on a virtual machine, install bind   package.

Modify the main configuration file, as above, modify the zone configuration file as follows.

650) this.width=650; "title=" DNS master-Slave synchronization modifies the zone profile. jpg "src=" http://s3.51cto.com/wyfs02/M01/6B/A9/ Wkiom1uzvenzp88qaabp3mx-hsy920.jpg "alt=" Wkiom1uzvenzp88qaabp3mx-hsy920.jpg "/>

shut down the firewall, and Sentenforce 0.

Also add from the server address on the master server and add it to the zone configuration file.

650) this.width=650; "title=" DNS master-Slave synchronization on the primary server zone file modification. jpg "src=" http://s3.51cto.com/wyfs02/M01/6B/A9/ Wkiom1uzvhlijnolaabyq6jlvoy590.jpg "alt=" Wkiom1uzvhlijnolaabyq6jlvoy590.jpg "/>

Start the named service from the server and set its native address to DNS in the NIC configuration file.

  echo "servername 192.168.28.150" >/etc/resolv.conf

This article from "Beida Jade Bird Linux" blog, declined reprint!

Linux DNS Service

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.