Archive:Docs/Drafts/AdministrationGuide/Servers/DNSBIND/BINDCache

From FedoraProject

Jump to: navigation, search

DNS and BIND

Cache-only Nameserver

A cache-only nameserver does not hold authoritative information for a zone or a domain. Instead, it performs recursive queries, and caches the results. This results in less network traffic for commonly accessed websites.

To use BIND as a cache-only nameserver:

yum install caching-nameserver
rm /etc/rndc.key
/usr/sbin/rndc-confgen
key "rndckey" {
algorithm hmac-md5;
secret "MpmPgP8WfwJsOEFehaJvEA==";
};

options {
default-key "rndckey";
default-server 127.0.0.1;
default-port 953;
};

#
key "rndckey" {
algorithm hmac-md5;
secret "MpmPgP8WfwJsOEFehaJvEA==";
};

options {
default-key "rndckey";
default-server 127.0.0.1;
default-port 953;
};
key "rndckey" {
algorithm hmac-md5;
secret "MpmPgP8WfwJsOEFehaJvEA==";
};

controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndckey"; };
};
service named start

Permissions

Run the following commands as root to set the correct mode, and user and group ownership for each file:

chown named:named /etc/named.caching-nameserver.conf; chown named:named /etc/named.rfc1912.zones
chmod 600 /etc/named.caching-nameserver.conf; chmod 600 /etc/named.rfc1912.zones

The zone database files in the /var/named/ directory, such as localdomain.zone, and localhost.zon, have read and write permissions by default. For security, it is recommended that these files are read-only. To make these files read-only, run the following command as root:

chmod 400 localdomain.zone  localhost.zone  named.broadcast  named.ca  named.ip6.local  named.local  named.zero


Administration Guide - TOC Previous Page - Running BIND in a chroot jail Next Page - DNS and Mail