include "/etc/bind/transfer.keys";

acl internal
	{
	!key external-key;
	key internal-key;
	192.168.0.0/16;
	10.0.0.0/8;
	172.16.0.0/12;
	127.0.0.0/8;
	};

acl external
	{
	!key internal-key;
	key external-key;
	any;
	};

view "internal"
	{
	match-clients
		{
		internal;
		};
	
	allow-recursion
		{
		any;
		};
	
	zone "."
		{
		type hint;
		file "/etc/bind/db.root";
		};
	
	zone "dhcp.oh.qwop.net"
		{
		file "pz/dhcp.oh.qwop.net";

		key-directory "/etc/bind/pz/keys";
		sig-validity-interval 30;
		auto-dnssec maintain;
		inline-signing yes;

		type master;
		allow-update
			{
			key dynamic;
			};

		notify explicit;
		also-notify
			{
			<slave 1 internal IP> key internal-key;
			<slave 2 internal IP> key internal-key;
			};
		};

	zone "oh.qwop.net"
		{
		file "pz/int.oh.qwop.net.signed";
		type master;

		notify explicit;
		also-notify
			{
			<slave 1 internal IP> key internal-key;
			<slave 2 internal IP> key internal-key;
			};
		};

	zone "168.192.in-addr.arpa"
		{
		file "pz/192.168";

		allow-update
			{
			key dynamic;
			};
		
		type master;
		notify explicit;
		also-notify
			{
			<slave 1 internal IP> key internal-key;
			<slave 2 internal IP> key internal-key;
			};
		};

	zone "b.5.c.0.1.1.f.1.0.7.4.0.1.0.0.2.ip6.arpa"
		{
		file "pz/2001:470:1f11:c5b::";

		allow-update
			{
			key dynamic;
			};
		
		type master;
		notify explicit;
		also-notify
			{
			127.0.0.1 key external-key;
			<slave 1 internal IP> key internal-key;
			<slave 2 internal IP> key internal-key;
			};
		};

	zone "qwop.net"
		{
		file "pz/int.qwop.net.signed";
		type master;
		notify explicit;
		also-notify
			{
			<slave 1 internal IP> key internal-key;
			<slave 2 internal IP> key internal-key;
			};
		};

	};

view "external"
	{
	recursion no;
	match-clients
		{
		external;
		};
	
	zone "oh.qwop.net"
		{
		file "pz/oh.qwop.net.signed";
		type master;
		notify explicit;
		also-notify
			{
			<slave 1 internal IP> key external-key;
			<slave 2 internal IP> key external-key;
			};
		};
	
	zone "qwop.net"
		{
		file "pz/qwop.net.signed";
		type master;
		notify explicit;
		also-notify
			{
			<slave 1 internal IP> key external-key;
			<slave 2 internal IP> key external-key;
			};
		};
	
	zone "b.5.c.0.1.1.f.1.0.7.4.0.1.0.0.2.ip6.arpa"
		{
		file "sz/2001:470:1f11:c5b::";
		type slave;
		masterfile-format text;
		masters
			{
			127.0.0.1 key internal-key;
			};
		notify explicit;
		also-notify
			{
			<slave 1 internal IP> key external-key;
			<slave 2 internal IP> key external-key;
			};
		};
	
	};

