// $OpenBSD: named-dual.conf,v 1.9 2008/01/03 21:20:25 jakob Exp $
//
// Example file for a named configuration with dual views,
// one processing recursive queries only and one processing
// authoritative-only queries.


// Update this list to include only the networks for which you want
// to execute recursive queries. The default setting allows all hosts
// on any IPv4 networks for which the system has an interface, and
// the IPv6 localhost address.
//
acl clients {
	localnets;
	::1;
};

options {
	version "";	// remove this to allow version queries

	listen-on    { 10.1.0.2; 127.0.0.1; };
	listen-on-v6 { 2001:470:1f0b:479:0:1:0:2; 2001:470:9c4a::1:0:2; ::1; };

	empty-zones-enable yes;
	query-source address 10.1.0.2 port *;
	query-source-v6 address 2001:470:9c4a::1:0:2 port *;
	allow-transfer { none; };
	dnssec-enable yes;
};

logging {
	category lame-servers { null; };
};

include "/etc/ns-master-ns-slave.key";

#server a.b.c.d {
#        keys {
#           ns-master-ns-slave. 
#        };
#};

include "/etc/rndc.key";

controls {
        inet 127.0.0.1 allow { 127.0.0.1; } keys { rndc-key; };
        inet ::1 allow { ::1; } keys { rndc-key; };
};


view "recursive" {
	match-clients { clients; };
	match-recursive-only yes;
	allow-recursion { clients; };
	include "/etc/trusted-keys";

	zone "." {
		type hint;
		file "etc/root.hint";
	};

	zone "localhost" {
		type master;
		file "standard/localhost";
		allow-transfer { localhost; };
	};

	zone "127.in-addr.arpa" {
		type master;
		file "standard/loopback";
		allow-transfer { localhost; };
	};

	zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" {
		type master;
		file "standard/loopback6.arpa";
		allow-transfer { localhost; };
	};

	zone "com" {
		type delegation-only;
	};

	zone "net" {
		type delegation-only;
	};

	zone "10.in-addr.arpa" IN {
		type master;
		file "master/10.zone";
	};

	zone "tosteberg.se" IN {
		type master;
		file "master/tosteberg.se-local.zone";
	};

	zone "a.4.c.9.0.7.4.0.1.0.0.2.ip6.arpa" {
                type master;
                file "master/a.4.c.9.0.7.4.0.1.0.0.2.zone";
	};
};

view "authoritative" {
	recursion no;
	additional-from-auth no;
	additional-from-cache no;

	// Master zones
	//
	//zone "myzone.net" {
	//	type master;
	//	file "master/myzone.net";
	//};

	// Slave zones
	//
	//zone "otherzone.net" {
	//	type slave;
	//	file "slave/otherzone.net";
	//	masters { 192.168.1.10; [...;] };
	//};
	zone "tosteberg.se" IN {
		type master;
		file "master/tosteberg.se-external.zone.signed";
		#allow-transfer { key ns-master-ns-slave.; }
	};

	zone "a.4.c.9.0.7.4.0.1.0.0.2.ip6.arpa" {
                type master;
                file "master/a.4.c.9.0.7.4.0.1.0.0.2.zone";
        };
};
