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
14include "../../_common/rndc.key";
15
16controls {
17	inet 10.53.0.2 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
18};
19
20options {
21	query-source address 10.53.0.2;
22	notify-source 10.53.0.2;
23	transfer-source 10.53.0.2;
24	port @PORT@;
25	pid-file "named.pid";
26	listen-on { 10.53.0.2; };
27	listen-on-v6 { fd92:7065:b8e:ffff::2; };
28	notify no;
29	recursion no;
30	serial-query-rate 100;
31	dnssec-validation no;
32};
33
34/*
35 * The comment lines starting with "#Tn" markers below are designed to be
36 * uncommented by "tests.sh" when running the tests to perform some of required
37 * tests which need ns2 reconfgiuration.
38 */
39
40view "default" {
41
42	catalog-zones {
43		zone "catalog1.example"
44			default-masters { 10.53.0.1; }
45			in-memory no
46			zone-directory "zonedir";
47		zone "catalog2.example"
48			default-primaries { 10.53.0.1 port @EXTRAPORT1@; }
49			in-memory yes;
50		zone "catalog3.example"
51			default-masters { 10.53.0.1; }
52			zone-directory "nonexistent";
53#T1		zone "catalog4.example"
54#T1			default-masters { 10.53.0.1; };
55#T2		zone "catalog5.example"
56#T2			default-primaries { 10.53.0.1; };
57		zone "catalog-bad1.example"
58			default-masters { 10.53.0.1; }
59			in-memory yes;
60		zone "catalog-bad2.example"
61			default-masters { 10.53.0.1; }
62			in-memory yes;
63		zone "catalog-bad3.example"
64			default-masters { 10.53.0.1; }
65			in-memory yes;
66		zone "catalog-bad4.example"
67			default-masters { 10.53.0.1; }
68			in-memory yes;
69	};
70
71	# A faulty dlz configuration to check if named and catz survive a certain class
72	# of failed configuration attempts (see GL #3060).
73	# We use "dlz" because the dlz processing code is located in an ideal place in
74	# the view configuration function for the test to cover the view reverting code.
75#T3	dlz "bad-dlz" {
76#T3		database "dlopen bad-dlz.so example.org";
77#T3	};
78
79	zone "dom-existing.example" {
80	    type primary;
81	    file "dom-existing.example.db";
82	};
83
84	zone "dom-existing-forward.example" {
85	    type forward;
86	    forward only;
87	    forwarders { 10.53.0.1; };
88	};
89
90	zone "dom-existing-forward-off.example" {
91	    type forward;
92	    forward only;
93	    forwarders { };
94	};
95
96	zone "catalog1.example" {
97		type secondary;
98		file "catalog1.example.db";
99		primaries { 10.53.0.1; };
100	};
101
102	zone "catalog2.example" {
103		type secondary;
104		file "catalog2.example.db";
105		primaries { 10.53.0.3; };
106	};
107
108	zone "catalog3.example" {
109		type secondary;
110		file "catalog3.example.db";
111		primaries { 10.53.0.1; };
112	};
113
114	zone "catalog4.example" {
115		type secondary;
116		file "catalog4.example.db";
117		primaries { 10.53.0.1; };
118	};
119
120	# When the following zone configuration is enabled, "dom3.example" should
121	# already exist as a member of "catalog1.example", and named should be able
122	# to deal with that situation (see GL #3911). Make sure that this duplicate
123	# zone comes after the the "catalog1.example" zone in the configuration file.
124#T4	zone "dom3.example" {
125#T4	    type secondary;
126#T4	    file "dom2.example.db";
127#T4	};
128
129	# No "version" property
130	zone "catalog-bad1.example" {
131		type secondary;
132		file "catalog-bad1.example.db";
133		primaries { 10.53.0.1; };
134	};
135
136	# Unsupported "version" property
137	zone "catalog-bad2.example" {
138		type secondary;
139		file "catalog-bad2.example.db";
140		primaries { 10.53.0.1; };
141	};
142
143	# Two RRs in TXT RRset for the "version" property
144	zone "catalog-bad3.example" {
145		type secondary;
146		file "catalog-bad3.example.db";
147		primaries { 10.53.0.1; };
148	};
149
150	# Type A "version" property
151	zone "catalog-bad4.example" {
152		type secondary;
153		file "catalog-bad4.example.db";
154		primaries { 10.53.0.1; };
155	};
156
157};
158
159view "ch" ch {
160
161	catalog-zones {
162		zone "catalog-bad5.example"
163			default-masters { 10.53.0.1; }
164			in-memory yes;
165	};
166
167	# Non-IN class catalog zone
168	zone "catalog-bad5.example" ch {
169		type secondary;
170		file "catalog-bad5.example.db";
171		primaries { 10.53.0.1; };
172	};
173
174};
175
176key tsig_key. {
177	secret "LSAnCU+Z";
178	algorithm @DEFAULT_HMAC@;
179};
180
181key next_key. {
182	secret "LaAnCU+Z";
183	algorithm @DEFAULT_HMAC@;
184};
185