Blame SOURCES/named.conf.sample

cf16a9
/*
cf16a9
 Sample named.conf BIND DNS server 'named' configuration file
cf16a9
 for the Red Hat BIND distribution.
cf16a9
cf16a9
 See the BIND Administrator's Reference Manual (ARM) for details, in:
cf16a9
   file:///usr/share/doc/bind-{version}/arm/Bv9ARM.html
cf16a9
 Also see the BIND Configuration GUI : /usr/bin/system-config-bind and 
cf16a9
 its manual.
cf16a9
*/
cf16a9
cf16a9
options
cf16a9
{
cf16a9
	// Put files that named is allowed to write in the data/ directory:
cf16a9
	directory 		"/var/named";		// "Working" directory
cf16a9
	dump-file 		"data/cache_dump.db";
cf16a9
        statistics-file 	"data/named_stats.txt";
cf16a9
        memstatistics-file 	"data/named_mem_stats.txt";
cf16a9
	secroots-file		"data/named.secroots";
cf16a9
	recursing-file		"data/named.recursing";
cf16a9
cf16a9
cf16a9
	/*
cf16a9
	  Specify listenning interfaces. You can use list of addresses (';' is
cf16a9
	  delimiter) or keywords "any"/"none"
cf16a9
	*/
cf16a9
	//listen-on port 53	{ any; };
cf16a9
	listen-on port 53	{ 127.0.0.1; };
cf16a9
cf16a9
	//listen-on-v6 port 53	{ any; };
cf16a9
	listen-on-v6 port 53	{ ::1; };
cf16a9
cf16a9
	/*
cf16a9
	  Access restrictions
cf16a9
cf16a9
	  There are two important options:
cf16a9
	    allow-query { argument; };
cf16a9
	      - allow queries for authoritative data
cf16a9
cf16a9
	    allow-query-cache { argument; };
cf16a9
	      - allow queries for non-authoritative data (mostly cached data)
cf16a9
cf16a9
	  You can use address, network address or keywords "any"/"localhost"/"none" as argument
cf16a9
	  Examples:
cf16a9
	    allow-query { localhost; 10.0.0.1; 192.168.1.0/8; };
cf16a9
	    allow-query-cache { ::1; fe80::5c63:a8ff:fe2f:4526; 10.0.0.1; };
cf16a9
	*/
cf16a9
cf16a9
	allow-query		{ localhost; };
cf16a9
	allow-query-cache	{ localhost; };
cf16a9
cf16a9
	/* Enable/disable recursion - recursion yes/no;
cf16a9
cf16a9
	 - If you are building an AUTHORITATIVE DNS server, do NOT enable recursion.
cf16a9
	 - If you are building a RECURSIVE (caching) DNS server, you need to enable 
cf16a9
	   recursion. 
cf16a9
	 - If your recursive DNS server has a public IP address, you MUST enable access 
cf16a9
	   control to limit queries to your legitimate users. Failing to do so will
cf16a9
	   cause your server to become part of large scale DNS amplification 
cf16a9
	   attacks. Implementing BCP38 within your network would greatly
cf16a9
	   reduce such attack surface 
cf16a9
	 */
cf16a9
	recursion yes;
cf16a9
cf16a9
	/* DNSSEC related options. See information about keys ("Trusted keys", bellow) */
cf16a9
cf16a9
	/* Enable DNSSEC validation on recursive servers */
cf16a9
	dnssec-validation yes;
cf16a9
cf16a9
	/* In Fedora we use /run/named instead of default /var/run/named
cf16a9
	   so we have to configure paths properly. */
cf16a9
	pid-file "/run/named/named.pid";
cf16a9
	session-keyfile "/run/named/session.key";
cf16a9
cf16a9
	managed-keys-directory "/var/named/dynamic";
cf16a9
cf16a9
    /* In Fedora we use system-wide Crypto Policy */
cf16a9
    /* https://fedoraproject.org/wiki/Changes/CryptoPolicy */
cf16a9
    include "/etc/crypto-policies/back-ends/bind.config";
cf16a9
};
cf16a9
cf16a9
logging 
cf16a9
{
cf16a9
/*      If you want to enable debugging, eg. using the 'rndc trace' command,
cf16a9
 *      named will try to write the 'named.run' file in the $directory (/var/named).
cf16a9
 *      By default, SELinux policy does not allow named to modify the /var/named directory,
cf16a9
 *      so put the default debug log file in data/ :
cf16a9
 */
cf16a9
        channel default_debug {
cf16a9
                file "data/named.run";
cf16a9
                severity dynamic;
cf16a9
        };
cf16a9
};
cf16a9
cf16a9
/*
cf16a9
 Views let a name server answer a DNS query differently depending on who is asking.
cf16a9
cf16a9
 By default, if named.conf contains no "view" clauses, all zones are in the 
cf16a9
 "default" view, which matches all clients.
cf16a9
cf16a9
 Views are processed sequentially. The first match is used so the last view should
cf16a9
 match "any" - it's fallback and the most restricted view.
cf16a9
cf16a9
 If named.conf contains any "view" clause, then all zones MUST be in a view.
cf16a9
*/
cf16a9
cf16a9
view "localhost_resolver"
cf16a9
{
cf16a9
/* This view sets up named to be a localhost resolver ( caching only nameserver ).
cf16a9
 * If all you want is a caching-only nameserver, then you need only define this view:
cf16a9
 */
cf16a9
	match-clients 		{ localhost; };
cf16a9
	recursion yes;
cf16a9
cf16a9
	# all views must contain the root hints zone:
cf16a9
	zone "." IN {
cf16a9
	        type hint;
cf16a9
	        file "/var/named/named.ca";
cf16a9
	};
cf16a9
cf16a9
        /* these are zones that contain definitions for all the localhost
cf16a9
         * names and addresses, as recommended in RFC1912 - these names should
cf16a9
	 * not leak to the other nameservers:
cf16a9
	 */
cf16a9
	include "/etc/named.rfc1912.zones";
cf16a9
};
cf16a9
view "internal"
cf16a9
{
cf16a9
/* This view will contain zones you want to serve only to "internal" clients
cf16a9
   that connect via your directly attached LAN interfaces - "localnets" .
cf16a9
 */
cf16a9
	match-clients		{ localnets; };
cf16a9
	recursion yes;
cf16a9
cf16a9
	zone "." IN {
cf16a9
	        type hint;
cf16a9
	        file "/var/named/named.ca";
cf16a9
	};
cf16a9
cf16a9
        /* these are zones that contain definitions for all the localhost
cf16a9
         * names and addresses, as recommended in RFC1912 - these names should
cf16a9
	 * not leak to the other nameservers:
cf16a9
	 */
cf16a9
	include "/etc/named.rfc1912.zones";
cf16a9
cf16a9
	// These are your "authoritative" internal zones, and would probably
cf16a9
	// also be included in the "localhost_resolver" view above :
cf16a9
cf16a9
	/*
cf16a9
	  NOTE for dynamic DNS zones and secondary zones:
cf16a9
cf16a9
	  DO NOT USE SAME FILES IN MULTIPLE VIEWS!
cf16a9
cf16a9
	  If you are using views and DDNS/secondary zones it is strongly
cf16a9
	  recommended to read FAQ on ISC site (www.isc.org), section
cf16a9
	  "Configuration and Setup Questions", questions
cf16a9
	  "How do I share a dynamic zone between multiple views?" and
cf16a9
	  "How can I make a server a slave for both an internal and an external
cf16a9
	   view at the same time?"
cf16a9
	*/
cf16a9
cf16a9
	zone "my.internal.zone" { 
cf16a9
		type master;
cf16a9
		file "my.internal.zone.db";
cf16a9
	};
cf16a9
	zone "my.slave.internal.zone" {
cf16a9
		type slave;
cf16a9
		file "slaves/my.slave.internal.zone.db";
cf16a9
		masters { /* put master nameserver IPs here */ 127.0.0.1; } ;
cf16a9
		// put slave zones in the slaves/ directory so named can update them
cf16a9
	};	
cf16a9
	zone "my.ddns.internal.zone" {
cf16a9
		type master;
cf16a9
		allow-update { key ddns_key; };
cf16a9
		file "dynamic/my.ddns.internal.zone.db";
cf16a9
		// put dynamically updateable zones in the slaves/ directory so named can update them
cf16a9
	};
cf16a9
};
cf16a9
cf16a9
key ddns_key
cf16a9
{
cf16a9
	algorithm hmac-sha256;
cf16a9
	secret "use /usr/sbin/ddns-confgen to generate TSIG keys";
cf16a9
};
cf16a9
cf16a9
view "external"
cf16a9
{
cf16a9
/* This view will contain zones you want to serve only to "external" clients
cf16a9
 * that have addresses that are not match any above view:
cf16a9
 */
cf16a9
	match-clients		{ any; };
cf16a9
cf16a9
	zone "." IN {
cf16a9
	        type hint;
cf16a9
	        file "/var/named/named.ca";
cf16a9
	};
cf16a9
cf16a9
	recursion no;
cf16a9
	// you'd probably want to deny recursion to external clients, so you don't
cf16a9
        // end up providing free DNS service to all takers
cf16a9
cf16a9
	// These are your "authoritative" external zones, and would probably
cf16a9
        // contain entries for just your web and mail servers:
cf16a9
cf16a9
	zone "my.external.zone" { 
cf16a9
		type master;
cf16a9
		file "my.external.zone.db";
cf16a9
	};
cf16a9
};
cf16a9
cf16a9
/* Trusted keys
cf16a9
cf16a9
  This statement contains DNSSEC keys. If you want DNSSEC aware resolver you
cf16a9
  should configure at least one trusted key.
cf16a9
cf16a9
  Note that no key written below is valid. Especially root key because root zone
cf16a9
  is not signed yet.
cf16a9
*/
cf16a9
/*
cf16a9
trust-anchors {
cf16a9
// Root Key
cf16a9
. initial-key 257 3 8 "AwEAAaz/tAm8yTn4Mfeh5eyI96WSVexTBAvkMgJzkKTOiW1vkIbzxeF3
cf16a9
		      +/4RgWOq7HrxRixHlFlExOLAJr5emLvN7SWXgnLh4+B5xQlNVz8Og8kv
cf16a9
		      ArMtNROxVQuCaSnIDdD5LKyWbRd2n9WGe2R8PzgCmr3EgVLrjyBxWezF
cf16a9
		      0jLHwVN8efS3rCj/EWgvIWgb9tarpVUDK/b58Da+sqqls3eNbuv7pr+e
cf16a9
		      oZG+SrDK6nWeL3c6H5Apxz7LjVc1uTIdsIXxuOLYA4/ilBmSVIzuDWfd
cf16a9
		      RUfhHdY6+cn8HFRm+2hM8AnXGXws9555KrUB5qihylGa8subX2Nn6UwN
cf16a9
		      R1AkUTV74bU=";
cf16a9
cf16a9
// Key for forward zone
cf16a9
example.com. static-key 257 3 8 "AwEAAZ0aqu1rJ6orJynrRfNpPmayJZoAx9Ic2/Rl9VQW
cf16a9
				LMHyjxxem3VUSoNUIFXERQbj0A9Ogp0zDM9YIccKLRd6
cf16a9
				LmWiDCt7UJQxVdD+heb5Ec4qlqGmyX9MDabkvX2NvMws
cf16a9
				UecbYBq8oXeTT9LRmCUt9KUt/WOi6DKECxoG/bWTykrX
cf16a9
				yBR8elD+SQY43OAVjlWrVltHxgp4/rhBCvRbmdflunaP
cf16a9
				Igu27eE2U4myDSLT8a4A0rB5uHG4PkOa9dIRs9y00M2m
cf16a9
				Wf4lyPee7vi5few2dbayHXmieGcaAHrx76NGAABeY393
cf16a9
				xjlmDNcUkF1gpNWUla4fWZbbaYQzA93mLdrng+M=";
cf16a9
cf16a9
cf16a9
// Key for reverse zone.
cf16a9
2.0.192.IN-ADDRPA.NET. initial-ds 31406 8 2 "F78CF3344F72137235098ECBBD08947C2C9001C7F6A085A17F518B5D8F6B916D";
cf16a9
};
cf16a9
*/