xref: /netbsd-src/external/mpl/bind/dist/bin/tests/system/rpzextra/ns3/named.conf.in (revision 7bdf38e5b7a28439665f2fdeff81e36913eef7dd)
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
14key rndc_key {
15    secret "1234abcd8765";
16	algorithm @DEFAULT_HMAC@;
17};
18
19controls {
20	inet 10.53.0.3 port @CONTROLPORT@ allow { any; } keys { rndc_key; };
21};
22
23options {
24	query-source address 10.53.0.3;
25	notify-source 10.53.0.3;
26	transfer-source 10.53.0.3;
27	port @PORT@;
28	listen-on { 10.53.0.3; };
29	pid-file "named.pid";
30	notify no;
31	dnssec-validation no;
32	allow-query { any; };
33	recursion yes;
34	allow-recursion { any; };
35	empty-zones-enable false;
36	response-policy {
37		zone "rpz-extra.local";
38	};
39};
40
41logging {
42	channel rpz_passthru {
43		file "rpz_passthru.txt" versions 3 size 5m;
44		print-time yes;
45		print-category yes;
46		print-severity yes;
47		severity info;
48	};
49
50	channel rpz_log {
51		file "rpz.txt" versions 3 size 20m;
52		print-time yes;
53		print-category yes;
54		print-severity yes;
55		severity info;
56	};
57
58	category rpz { rpz_log; default_debug; };
59	category rpz-passthru { rpz_passthru; default_debug; };
60};
61
62view "first" {
63	match-clients { 10.53.0.1; };
64	zone "." {
65		type hint;
66		file "root.db";
67	};
68	zone "rpz.local" {
69		type primary;
70		file "first-rpz.local.db";
71		allow-transfer { none; };
72		allow-query { localhost; };
73	};
74	response-policy {
75		zone "rpz.local";
76	};
77};
78
79view "second" {
80	match-clients { 10.53.0.2; };
81	zone "." {
82		type hint;
83		file "root.db";
84	};
85	zone "rpz-external.local" {
86		type secondary;
87		primaries { 10.53.0.2; };
88		file "second-rpz-external.local.db";
89		allow-query { 10.53.0.2; };
90	};
91	response-policy {
92		zone "rpz-external.local";
93	};
94};
95
96view "third" {
97	match-clients { 10.53.0.3; };
98	zone "." {
99		type hint;
100		file "root.db";
101	};
102	zone "rpz-extra.local" {
103		type primary;
104		file "third-rpz-extra.local.db";
105		allow-transfer { none; };
106		allow-query { localhost; };
107	};
108};
109
110view "fourth" {
111	match-clients { 10.53.0.4; };
112	zone "." {
113		type hint;
114		file "root.db";
115	};
116	zone "rpz-extra.local" {
117		type primary;
118		file "fourth-rpz-extra.local.db";
119		allow-transfer { none; };
120		allow-query { localhost; };
121	};
122};
123
124view "external" {
125	match-clients { any; };
126	zone "." {
127		type hint;
128		file "root.db";
129	};
130	zone "rpz.local" {
131		type primary;
132		file "external-rpz.local.db";
133		allow-transfer { none; };
134		allow-query { localhost; };
135	};
136	zone "rpz-external.local" {
137		type secondary;
138		masterfile-format text;
139		primaries { 10.53.0.2; };
140		file "external-rpz-external.local.db";
141		allow-query { 10.53.0.5; };
142	};
143	response-policy {
144		zone "rpz-external.local";
145		zone "rpz.local";
146	};
147};
148