File: localdata.rpl

package info (click to toggle)
unbound 1.6.0-2~bpo8+1
  • links: PTS, VCS
  • area: main
  • in suites: jessie-backports
  • size: 20,444 kB
  • sloc: ansic: 79,862; sh: 5,040; yacc: 1,900; makefile: 1,315; python: 1,302; perl: 141
file content (357 lines) | stat: -rw-r--r-- 6,516 bytes parent folder | download | duplicates (10)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
; config options
server:
	hide-identity: no
	hide-version: no
	identity: "test-identity"
	version: "test-version"

	; implicit transparent zone should not block id.server
	local-data: "mydata.server. CH A 10.11.12.13"
	local-data: "myd2.server. CH A 10.11.12.14"
	local-data: 'myd3.server. CH TXT "a text record"'
	; together implicit CH top domain .server is created transparent.

	; static zone
	local-zone: "local" static
	local-data: "local SOA nobody nobody 1 2 3 4 5"
	local-data: "serv.local. A 20.30.40.50"
	; multiple RRs in this RRset.
	local-data: "bla.bla.local. A 20.30.40.51"
	local-data: "bla.bla.local. A 20.30.40.52"
	local-data: "bla.bla.local. A 20.30.40.53"
	
	; static zone (no soa)
	local-zone: "noso.local" static
	local-data: "bla.bla.noso.local AAAA 2001::2"

	; deny zone (no answer)
	local-zone: "deny.top." deny
	
	; refuse zone (error)
	local-zone: "refuse.top." refuse

	; redirect zone
	local-zone: "redirect.top." redirect
	local-data: "redirect.top. A 20.30.40.54"

	; create implicit data in the IN domain as well
	local-data: "a.a.implicit. A 20.30.41.50"
	local-data: "b.a.implicit. A 20.30.42.50"
	local-data: "b.b.implicit. A 20.30.43.50"
	local-data: "b.c.implicit. A 20.30.45.50"
	local-data: "c.c.implicit. A 20.30.44.50"

CONFIG_END
SCENARIO_BEGIN Test local data queries

; id.server.
STEP 1 QUERY
ENTRY_BEGIN
SECTION QUESTION
id.server. CH TXT
ENTRY_END
STEP 2 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA
SECTION QUESTION
id.server. CH TXT
SECTION ANSWER
id.server. 0 CH TXT	"test-identity"
ENTRY_END

; mydata.server.
STEP 3 QUERY
ENTRY_BEGIN
SECTION QUESTION
mydata.server. CH A
ENTRY_END
STEP 4 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
mydata.server. CH A
SECTION ANSWER
mydata.server. 3600 CH A 10.11.12.13
ENTRY_END

; nodata with SOA
STEP 5 QUERY
ENTRY_BEGIN
SECTION QUESTION
local. IN A
ENTRY_END
STEP 6 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
local. IN A
SECTION AUTHORITY
local. 3600 IN SOA nobody nobody 1 2 3 4 5
ENTRY_END

; positive SOA
STEP 7 QUERY
ENTRY_BEGIN
SECTION QUESTION
local. IN SOA
ENTRY_END
STEP 8 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
local. IN SOA
SECTION ANSWER
local. 3600 IN SOA nobody nobody 1 2 3 4 5
ENTRY_END

; positive subdomain
STEP 9 QUERY
ENTRY_BEGIN
SECTION QUESTION
serv.local. IN A
ENTRY_END
STEP 10 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
serv.local. IN A
SECTION ANSWER
serv.local. IN A 20.30.40.50
ENTRY_END

; no such type
STEP 11 QUERY
ENTRY_BEGIN
SECTION QUESTION
serv.local. IN MX
ENTRY_END
STEP 12 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
serv.local. IN MX
SECTION AUTHORITY
local. 3600 IN SOA nobody nobody 1 2 3 4 5
ENTRY_END

; no such type, empty nonterminal
STEP 13 QUERY
ENTRY_BEGIN
SECTION QUESTION
bla.local. IN MX
ENTRY_END
STEP 14 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
bla.local. IN MX
SECTION AUTHORITY
local. 3600 IN SOA nobody nobody 1 2 3 4 5
ENTRY_END

; nxdomain with SOA
STEP 15 QUERY
ENTRY_BEGIN
SECTION QUESTION
doing.local. IN MX
ENTRY_END
STEP 16 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA NXDOMAIN
SECTION QUESTION
doing.local. IN MX
SECTION AUTHORITY
local. 3600 IN SOA nobody nobody 1 2 3 4 5
ENTRY_END

; nxdomain without SOA
STEP 17 QUERY
ENTRY_BEGIN
SECTION QUESTION
doing.noso.local. IN MX
ENTRY_END
STEP 18 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA NXDOMAIN
SECTION QUESTION
doing.noso.local. IN MX
ENTRY_END

; positive multiple RR
STEP 19 QUERY
ENTRY_BEGIN
SECTION QUESTION
bla.bla.local. IN A
ENTRY_END
STEP 20 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
bla.bla.local. IN A
SECTION ANSWER
bla.bla.local. IN A 20.30.40.51
bla.bla.local. IN A 20.30.40.52
bla.bla.local. IN A 20.30.40.53
ENTRY_END

; second implicit transparent zone.
STEP 21 QUERY
ENTRY_BEGIN
SECTION QUESTION
b.b.implicit. IN A
ENTRY_END
STEP 22 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
b.b.implicit. IN A
SECTION ANSWER
b.b.implicit. 3600 IN A 20.30.43.50
ENTRY_END

; localhost A default
STEP 30 QUERY
ENTRY_BEGIN
SECTION QUESTION
localhost. IN A
ENTRY_END
STEP 31 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
localhost. IN A
SECTION ANSWER
localhost. 10800 IN A 127.0.0.1
ENTRY_END

; localhost AAAA default
STEP 32 QUERY
ENTRY_BEGIN
SECTION QUESTION
localhost. IN AAAA
ENTRY_END
STEP 33 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
localhost. IN AAAA
SECTION ANSWER
localhost. 10800 IN AAAA ::1
ENTRY_END

; localhost A reverse default
STEP 34 QUERY
ENTRY_BEGIN
SECTION QUESTION
1.0.0.127.in-addr.arpa. IN PTR
ENTRY_END
STEP 35 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
1.0.0.127.in-addr.arpa. IN PTR
SECTION ANSWER
1.0.0.127.in-addr.arpa. 10800 IN PTR localhost.
ENTRY_END

; localhost AAAA reverse default
STEP 36 QUERY
ENTRY_BEGIN
SECTION QUESTION
1.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. IN PTR
ENTRY_END
STEP 37 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA
SECTION QUESTION
1.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. IN PTR
SECTION ANSWER
1.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. 10800 IN PTR localhost.
ENTRY_END

; blocked AS112 reverse default
STEP 38 QUERY
ENTRY_BEGIN
SECTION QUESTION
1.0.0.10.in-addr.arpa. IN PTR
ENTRY_END
STEP 39 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA NXDOMAIN
SECTION QUESTION
1.0.0.10.in-addr.arpa. IN PTR
SECTION AUTHORITY
10.in-addr.arpa. 10800 IN SOA localhost. nobody.invalid. 1 3600 1200 604800 10800
ENTRY_END

; refuse zone
STEP 40 QUERY
ENTRY_BEGIN
SECTION QUESTION
www.refuse.top. IN A
ENTRY_END
STEP 41 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA REFUSED
SECTION QUESTION
www.refuse.top. IN A
ENTRY_END

; deny zone
STEP 42 QUERY
ENTRY_BEGIN
SECTION QUESTION
www.deny.top. IN A
ENTRY_END
; no answer is checked at exit of testbound.

; redirect zone apex
STEP 50 QUERY
ENTRY_BEGIN
SECTION QUESTION
redirect.top. IN A
ENTRY_END
STEP 51 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA NOERROR
SECTION QUESTION
redirect.top. IN A
SECTION ANSWER
redirect.top. IN A 20.30.40.54
ENTRY_END

; redirect zone
STEP 52 QUERY
ENTRY_BEGIN
SECTION QUESTION
www.redirect.top. IN A
ENTRY_END
STEP 53 CHECK_ANSWER
ENTRY_BEGIN
MATCH all
REPLY QR RA AA NOERROR
SECTION QUESTION
www.redirect.top. IN A
SECTION ANSWER
www.redirect.top. IN A 20.30.40.54
ENTRY_END

SCENARIO_END