Building a DNS service on a Linux server

Source: Internet
Author: User
Tags domain name server mail exchange

Experiment


Lab Environment:

Build two Linux servers on the virtual machine as master and slave servers

Experimental requirements:

First, use BIND to build the primary name server, configure the forward address resolution record and reverse address resolution record.

Second, using BIND to build from the domain name server, realize the master-slave zone data file synchronization.

Experimental steps:

First, use BIND to build the primary name server, configure the forward address resolution record and reverse address resolution record.

To install the DNS service using the RPM method :

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/11/wKioL1T1lKzCAKljAADRU9PCG3Y206.jpg "title=" 1.jpg " alt= "Wkiol1t1lkzcakljaadru9pcg3y206.jpg"/>


To edit the /etc/named.conf configuration file:


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/11/wKioL1T1lNWw5-ZoAACgCaCMIl4773.jpg "title=" 2.jpg " alt= "Wkiol1t1lnww5-zoaacgcacmil4773.jpg"/>


Global configuration section:

Edit the listening port to the native IP address, allowing all network segments to be set to any :


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/11/wKioL1T1lPDhuiL-AAEcNpqe0LU705.jpg "title=" 3.jpg " alt= "Wkiol1t1lpdhuil-aaecnpqe0lu705.jpg"/>


Area Configuration section:

To edit a zone configuration file:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/11/wKioL1T1lRPBrBxgAABwvg5fn58496.jpg "title=" 4.jpg " alt= "Wkiol1t1lrpbrbxgaabwvg5fn58496.jpg"/>


Set the forward zone domain name benet.com, type main zone, and zone data file to Benet.com.zone:


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/11/wKioL1T1lTmxeIVmAAChDsUcUk8657.jpg "title=" 5.jpg " alt= "Wkiol1t1ltmxeivmaachdsucuk8657.jpg"/>


Copy the local zone data file template to the owner group named Benet.com.zone, using the cp-p reserved file:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/15/wKiom1T1lDmzeRXqAAGd6v4K-Ns269.jpg "title=" 6.jpg " alt= "Wkiom1t1ldmzerxqaagd6v4k-ns269.jpg"/>


To edit a zone data file:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/15/wKiom1T1lGej2qcFAAECwVSY7is950.jpg "title=" 7.jpg " alt= "Wkiom1t1lgej2qcfaaecwvsy7is950.jpg"/>


To edit a forward address resolution record:

Set DNS zone name to admin, resolve DNS server IP address, mail exchange record, forward parsing an IP address A record that records the alias of the message area name, and the pan address resolution to match any host name.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/11/wKioL1T1lZiiVtHpAADGYTQ_v-8954.jpg "title=" 8.jpg " alt= "Wkiol1t1lziivthpaadgytq_v-8954.jpg"/>



Specify a DNS server address for this machine:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/15/wKiom1T1lLaxLSZSAAC_8xlqdVg143.jpg "title=" 9.jpg " alt= "Wkiom1t1llaxlszsaac_8xlqdvg143.jpg"/>


To set the reverse zone data file:


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/15/wKiom1T1lM2QZ_tZAACyPmCpONo107.jpg "title=" 10.jpg "alt=" Wkiom1t1lm2qz_tzaacypmcpono107.jpg "/>


Edit the reverse zone file address, data file name.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/11/wKioL1T1lfWDw9YRAADKwvWB3pc924.jpg "title=" 11.jpg "alt=" Wkiol1t1lfwdw9yraadkwvwb3pc924.jpg "/>



Use the cp-p command to copy the data file to the name benet.com.local, reserved for the owner, the group.

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/11/wKioL1T1liuQaoqMAACbp1Gij-4448.jpg "title=" 12.jpg "alt=" Wkiol1t1liuqaoqmaacbp1gij-4448.jpg "/>


Edit the reverse data file, specify the Host part of the88,99 zone name, when using the full FQDN address, the point at the end of the address cannot be omitted:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/11/wKioL1T1lkzw2N2dAADFljHGqh4588.jpg "title=" 13.jpg "alt=" Wkiol1t1lkzw2n2daadfljhgqh4588.jpg "/>


Reload the DNS Service:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/11/wKioL1T1lmOSVvjcAACFp7xw1xA466.jpg "title=" 14.jpg "alt=" Wkiol1t1lmosvvjcaacfp7xw1xa466.jpg "/>


To test the domain name resolution using the host command:

Forward parsing:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/15/wKiom1T1leeCsphAAADan6FWFNU559.jpg "title=" 15.jpg "alt=" Wkiom1t1leecsphaaadan6fwfnu559.jpg "/>


Reverse parsing:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/11/wKioL1T1lyWRPaSeAAEmAclDaVg554.jpg "title=" 16.jpg "alt=" Wkiol1t1lywrpaseaaemacldavg554.jpg "/>


Second, using BIND to build from the domain name server, realize the master-slave zone data file synchronization.

Build from a domain name server:

To install the DNS service using the RPM method :

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/15/wKiom1T1ljaSgxUsAAPqLVth7tU060.jpg "title=" 17.jpg "alt=" Wkiom1t1ljasgxusaapqlvth7tu060.jpg "/>



To edit the /etc/name.d.conf Global configuration file:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/11/wKioL1T1l3Th2HH9AAGMa6UziNk768.jpg "title=" 18.jpg "alt=" Wkiol1t1l3th2hh9aagma6uzink768.jpg "/>


Edit the /etc/named.rfc1912.zones zone configuration file:

The zone name is benet.com, the type is from, the primary server address is set, and the zone data file path is specified:


650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/11/wKioL1T1l5SjQq04AADRjRC61uY853.jpg "title=" 19.jpg "alt=" Wkiol1t1l5sjqq04aadrjrc61uy853.jpg "/>


Edit /etc/named.rfc1912.zones on the primary domain name server

Set the address that allows the zone data file to be transferred:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/15/wKiom1T1lrOBAjMoAACyEEtfV5Y592.jpg "title=" 20.jpg "alt=" Wkiom1t1lrobajmoaacyeetfv5y592.jpg "/>


Add from Name server address:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/5A/11/wKioL1T1l-Og7jSfAACvZlOyFwM781.jpg "title=" 21.jpg "alt=" Wkiol1t1l-og7jsfaacvzloyfwm781.jpg "/>


Reload the master-slave server to see if the data files from the domain name server are synchronized:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/5A/11/wKioL1T1mB6TXK5DAAEZAoR3K7A202.jpg "title=" 22.jpg "alt=" Wkiol1t1mb6txk5daaezaor3k7a202.jpg "/>


Add a DNS server address from the server:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M02/5A/15/wKiom1T1lyWgQLd3AADftJC4SFc345.jpg "title=" 23 (2). JPG "alt=" wkiom1t1lywgqld3aadftjc4sfc345.jpg "/>


Use the host command to parse the Web site address from the server:

650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/5A/11/wKioL1T1mFfztxONAADsFPD40OY568.jpg "title=" 24.jpg "alt=" Wkiol1t1mffztxonaadsfpd40oy568.jpg "/>


Experiment completed


This article from "Joint efforts, common progress ~ ~" blog, please be sure to keep this source http://9067358.blog.51cto.com/9057358/1616971

Building a DNS service on a Linux server

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.