Build a DNS Master/Slave server using bind in Linux

Source: Internet
Author: User
Tags cc domain
Assume that Company A is in A domain name provider 6688. I registered a domain name on the cc. Now I don't want to use the DNS server of a domain name provider. Instead, I want to create two DNS servers. One is the master server, the other is the slave server, and the other two are the slave servers: ns1.6688.cc, ns2.6688.cc how do we configure these two hosts as DNS servers? First, Company A has Assume that Company A is in A domain name provider 6688. I registered a domain name on the cc. Now I don't want to use the DNS server of a domain name provider. Instead, I want to create two DNS servers. One is the master server, the other is the slave server, and the other two are the slave servers: ns1.6688.cc, ns2.6688.cc how do we configure these two hosts as DNS servers?


First, Company A has the following requirements:
1. The company has a mail server that needs to be resolved to mail.6688.cc
2. The company has FtpServer, need to be parsed ftp.6688.cc
3. You have your own domain name and BbsAnd so on


Now, we can configure the two servers based on the above requirements.


0 The bind server must be installed on the two hosts. Otherwise, the bind server cannot continue.
  1. Yum install bind
1. Go to the Management page of a domain name provider's 6688. cc backend and change the address of the two DNS servers to your host name. (This step is omitted during study)
Ns1.6688.cc
Ns2.6688.cc


2. In order to ensure that the company's network address can be properly resolved, we configure ns1 as the master server, ns2-as the slave server, if ns1 address is 172.16.100.1, and ns2-'s slave server is 172.16.100.2

1) log on to 172.16.100.1 HOST: ns1.6688.cc, edit its dns master configuration file, define the working directory, add two regions, one forward resolution and one reverse resolution
  1. # Vim/etc/namEd. Conf
  2. # Forward
  3. Option {
  4. Directory\ "/Var/named \";
  5. };
  6. Zone\ "6688. cc \"IN {# declare copying the 6688. cc domain
  7. Type master; # type: master
  8. File \ "6688. cc. zone \"; # Parsing files
  9. };
  10. # Reverse
  11. Zone\ "16.172.in-DdR. arpa \"IN {
  12. Type master;
  13. File\ "172.16.zone \";
  14. };
  15. # Enter the ip address in the reverse direction (because it is resolved in reverse direction), for example, 1.100.10.172.
2) configure the forward resolution file 6688.cc
  1. Cd/Var/named
  2. Vim 6688.cc
  3. $ TTL 1200
  4. @ In soa ns1.6688.cc. admin.6688.cc. (# SOA Field
  5. 2011081601 # version number synchronization + 1
  6. 1 H # Update Time
  7. 10 MM # update failed. Retry the Update Time
  8. 7D # How long after the update fails
  9. 1D) # No response time for the resolution request
  10. In ns ns1.6688.cc.
  11. In ns ns2.6688.cc.
  12. In mx 10 mail.6688.cc. #10 indicates that the priority is 0-99. The smaller the number, the higher the priority.
Related Article

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.