Build a DNS server in Linux

Source: Internet
Author: User
Tags dnssec

I have set up a server on Linux in four steps:

Install

Configuration

Start the service

Use

For centos, I Like Yum and Yum, which can automatically parse dependencies. Therefore, installation is generally normal and it is easy to start the service. Generally, service XX start is used, it is easier to use, and the trouble is complicated in the configuration file.

The Configuration File. at the end of conf, most of them are in the/etc directory. For the DNS server, I installed bind and bind-chroot, and I didn't care about bind-root, so my named under/etc. CONF configuration, the configuration information is as follows:

 

 

Options {
Listen-on port 53 {127.0.0.1 ;};
Listen-on-v6 port 53 {: 1 ;};
Directory "/var/named/chroot/var/named ";
Dump-file "/var/named/data/cache_dump.db ";
Statistics-file "/var/named/chroot/var/data/named_stats.txt ";
Memstatistics-file "/var/named/data/named_mem_stats.txt ";
Allow-query {localhost ;};
Recursion yes;

DNSSEC-enable yes;
DNSSEC-validation yes;
DNSSEC-lookaside auto;

/* Path to isc dlv key */
Bindkeys-file "etc/named. iscdlv. Key ";

Managed-keys-directory "/var/named/chroot/var/dynamic ";
};

But the prompt "/var/named/chroot/var/" cannot be found, but my path is correct. At this time, I think it should be the chroot, And I Will Google what the chroot is doing, I have explained a lot about this on the Internet. I have extracted a bit:

 

Chroot: Change root directory (Change root directory ). In Linux, the default directory structure is '/', that is, it starts with root. After chroot is used, the directory structure of the system uses the specified location as the '/' location.

 

This means that after chroot is used, "/var/named/chroot" is equivalent to "/". Therefore, replace the former with the latter, copy/etc/namd * and other files to/var/named/chroot/etc. After replacement, the configuration file is OK. The configuration file is as follows:

 

Options {
Listen-on port 53 {127.0.0.1 ;};
Listen-on-v6 port 53 {: 1 ;};
Directory "/var/named ";
Dump-file "/var/named/data/cache_dump.db ";
Statistics-file "/var/named/data/named_stats.txt ";
Memstatistics-file "/var/named/data/named_mem_stats.txt ";
Allow-query {localhost ;};
Recursion yes;

DNSSEC-enable yes;
DNSSEC-validation yes;
DNSSEC-lookaside auto;

/* Path to isc dlv key */
Bindkeys-file "etc/named. iscdlv. Key ";

Managed-keys-directory "/var/dynamic ";
};

 

 

 

Then configure the forward and reverse resolution files.

 

From http: // 210.38.120.242/JG/flash/jxnr/ydw/7-6.swf

 

 

 

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.