Build DNS Server under Linux

Source: Internet
Author: User
Keywords linux dns dns server

The Domain Name System (DNS) is the phone book of the Internet. When a user types a domain name (such as "google.com" or "nytimes.com") in a web browser, DNS is responsible for finding the correct IP addresses for these sites. The browser then uses these addresses to communicate with the origin or CDN edge server to access website information. This is all thanks to DNS servers: machines dedicated to answering DNS queries. This article introduces how to build a DNS server under Linux.

1. Installation service


yum --y install bind #Install DNS service
yum install bind-utils --y #Install DNS detection tool
 

2. Edit the configuration file

vi /etc/named.conf


3. Check for grammatical errors

named-checkconf
 

4. Edit the configuration file

vi /etc/named.rfc1912.zones

 

5. Write forward DNS configuration

cd /var/named
cp -p named.localhost hello.com.zone #Edit the forward zone data configuration file, pay attention to the source file permissions when copying the configuration file
vi hello.com.zone //Edit the content of the forward zone data configuration file
 

 

6. Edit the reverse configuration file

cp -p hello.com.zone hello.com.local #copy reverse zone data configuration file
vi hello.com.local
 

 

7. Test the DNS server

service named restart #Restart the service
vi /etc/resolv.conf #Add a new DNS nameserver 192.168.73.160
nslookup www.hello.com #Forward test DNS
nslookup 192.168.73.160 #Reverse test DNS
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.