1/*
2 * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
3 *
4 * SPDX-License-Identifier: MPL-2.0
5 *
6 * This Source Code Form is subject to the terms of the Mozilla Public
7 * License, v. 2.0.  If a copy of the MPL was not distributed with this
8 * file, you can obtain one at https://mozilla.org/MPL/2.0/.
9 *
10 * See the COPYRIGHT file distributed with this work for additional
11 * information regarding copyright ownership.
12 */
13
14acl accept { 10.53.0.2; };
15
16acl badaccept { 10.53.0.1; };
17
18key one {
19	algorithm hmac-md5;
20	secret "1234abcd8765";
21};
22
23key two {
24	algorithm hmac-md5;
25	secret "1234efgh8765";
26};
27
28options {
29	port @PORT@;
30	pid-file "named.pid";
31	listen-on { 10.53.0.2; };
32	listen-on-v6 { none; };
33	recursion no;
34	dnssec-validation no;
35};
36
37include "controls.conf";
38
39zone "." {
40	type hint;
41	file "../../_common/root.hint";
42};
43
44zone "normal.example" {
45	type primary;
46	file "generic.db";
47};
48
49zone "any.example" {
50	type primary;
51	file "generic.db";
52	allow-query { any; };
53};
54
55zone "none.example" {
56	type primary;
57	file "generic.db";
58	allow-query { none; };
59};
60
61zone "addrallow.example" {
62	type primary;
63	file "generic.db";
64	allow-query { 10.53.0.2; };
65};
66
67zone "addrnotallow.example" {
68	type primary;
69	file "generic.db";
70	allow-query { 10.53.0.1; };
71};
72
73zone "addrdisallow.example" {
74	type primary;
75	file "generic.db";
76	allow-query { ! 10.53.0.2; };
77};
78
79zone "aclallow.example" {
80	type primary;
81	file "generic.db";
82	allow-query { accept; };
83};
84
85zone "aclnotallow.example" {
86	type primary;
87	file "generic.db";
88	allow-query { badaccept; };
89};
90
91zone "acldisallow.example" {
92	type primary;
93	file "generic.db";
94	allow-query { ! accept; };
95};
96
97/* Also usable for testing key not allowed */
98zone "keyallow.example" {
99	type primary;
100	file "generic.db";
101	allow-query { key one; };
102};
103
104zone "keydisallow.example" {
105	type primary;
106	file "generic.db";
107	allow-query { ! key one; };
108};
109