Bind Installation notes, named. conf understanding.

Source: Internet
Author: User
Tags domain name server nameserver

[Root @ 46/] # Yum-y install bind-chroot bind-libs bind-utils caching-nameserver

Directory description
/Var/named/chroot/etc# Store named. conf
/Var/named/chroot/var/named# Store zone & ARPA files
/Var/log/messages# Viewing error information during configuration

[Root @ 46 etc] # pwd
/Var/named/chroot/etc

[Root @ 46 etc] # cp-P named. caching-nameserver.conf named. conf# The book said that named. conf will automatically enable named. caching-nameserver.conf, but did not try
[Root @ 46 etc] # ls
Localtime named. caching-nameserver.conf named. conf named. rfc1912.zones rndc. Key

[Root @ 46 etc] # vi named. conf

// Refer to Chapter 11th of "Linux system and Network Service Management Technology Daquan". Some Notes are self-explanatory and may not be correct.

//
// Named. caching-nameserver.conf
//
// Named. caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure
// Isc bind named (8) DNS server as a caching only nameserver
// (As a localhost DNS resolver only ).
//
// See/usr/share/doc/Bind */sample/For example named configuration files.
//
// Do not edit this file-use system-config-bind or an editor
// To create named. conf-edits to this file will be lost on
// Caching-nameserver package upgrade.
//
Options {// Global configuration options and some default settings of the server
Listen-on port 53 {Any ;};// Listening port, which can also be set to {127.0.0.1; 192.168.139.46 ;}

Listen-on-v6 port 53 {: 1 ;};// Supports ip6

Directory "/var/named ";// Region file storage directory
Dump-file "/var/named/data/cache_dump.db ";// Directory of dump cach
Statistics-file "/var/named/data/named_stats.txt ";
Memstatistics-file "/var/named/data/named_mem_stats.txt ";

PID-file "/var/run/named. PID "; // Save the named PID
Forwarders {168.95.1.1; 139.175.10.20 ;}; // If the Domain Name Server cannot be resolved, submit the request to 168.95.1.1; 139.175.10.20 for resolution.
Allow-query {Any ;}; // Specify the host that can be queried. Of course, all computers can check the host.
Allow-transfer {none ;}; // Specify the host that allows the request to be sent from the region. The white point is defined by the secondary DNS. For example, the IP address of the secondary DNS is192.168.139.5You can define {192.168.139.5;} In this way. Otherwise, the primary and secondary DNS cannot be synchronized. Of course, the ACL mentioned in {} can also be used.
// Those options shocould be used carefully because they disable port
// Randomization
// Query-source port 53;
// Query-source-v6 port 53;

};
Logging {// Specify the server log record content and log information source
Channel default_debug {
File "Data/named. Run ";
Severity dynamic;
};
};

// Define an ACL list
ACL "acl1 "{
192.168.139.0/200; 192.168.1.0/200
};

View localhost_resolver {// Define a view
Match-clients {Any ;};// The Source Address of the queryer. Any indicates that the localhost_resolver view is open to any host. If it is written as {acl1;}, only the IP addresses in the acl1 table can be recursively queried.
Match-destinations {Any ;};// The target address of the queryer, which can also be written as {localhost; acl1 ;}
Recursion yes;// Set for recursive query
Include "/etc/named. rfc1912.zones ";// Contains the file, which is loaded in/etc/named. rfc1912.zones

};

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.