Home | History | Annotate | Line # | Download | only in testdata
      1 ; config options
      2 server:
      3 	target-fetch-policy: "0 0 0 0 0"
      4 
      5 auth-zone:
      6 	name: "example.com."
      7 	## zonefile (or none).
      8 	## zonefile: "example.com.zone"
      9 	## master by IP address or hostname
     10 	## can list multiple masters, each on one line.
     11 	## master:
     12 	## url for http fetch
     13 	## url:
     14 	## queries from downstream clients get authoritative answers.
     15 	## for-downstream: yes
     16 	for-downstream: no
     17 	## queries are used to fetch authoritative answers from this zone,
     18 	## instead of unbound itself sending queries there.
     19 	## for-upstream: yes
     20 	for-upstream: yes
     21 	## on failures with for-upstream, fallback to sending queries to
     22 	## the authority servers
     23 	## fallback-enabled: no
     24 	zonemd-check: yes
     25 
     26 	## this line generates zonefile: \n"/tmp/xxx.example.com"\n
     27 	zonefile:
     28 TEMPFILE_NAME example.com
     29 	## this is the inline file /tmp/xxx.example.com
     30 	## the tempfiles are deleted when the testrun is over.
     31 TEMPFILE_CONTENTS example.com
     32 example.com. IN SOA ns.example.com. hostmaster.example.com. 200154054 28800 7200 604800 3600
     33 example.com. IN NS ns.example.com.
     34 example.com. IN ZONEMD 200154054 1 2 EFAA5B78B38AB1C45DE57B8167BCCE906451D0E72118E1F5E80B5F0C3CF04BFFC65D53C011185528EAD439D6F3A02F511961E090E5E4E0DFA013BD276D728B22
     35 www.example.com. IN A 127.0.0.1
     36 ns.example.com. IN A 127.0.0.1
     37 bar.example.com. IN A 1.2.3.4
     38 ding.example.com. IN A 1.2.3.4
     39 foo.example.com. IN A 1.2.3.4
     40 TEMPFILE_END
     41 
     42 stub-zone:
     43 	name: "."
     44 	stub-addr: 193.0.14.129 	# K.ROOT-SERVERS.NET.
     45 CONFIG_END
     46 
     47 SCENARIO_BEGIN Test authority zone with ZONEMD from zonefile
     48 
     49 ; K.ROOT-SERVERS.NET.
     50 RANGE_BEGIN 0 100
     51 	ADDRESS 193.0.14.129
     52 ENTRY_BEGIN
     53 MATCH opcode qtype qname
     54 ADJUST copy_id
     55 REPLY QR NOERROR
     56 SECTION QUESTION
     57 . IN NS
     58 SECTION ANSWER
     59 . IN NS	K.ROOT-SERVERS.NET.
     60 SECTION ADDITIONAL
     61 K.ROOT-SERVERS.NET.	IN	A	193.0.14.129
     62 ENTRY_END
     63 
     64 ENTRY_BEGIN
     65 MATCH opcode subdomain
     66 ADJUST copy_id copy_query
     67 REPLY QR NOERROR
     68 SECTION QUESTION
     69 com. IN NS
     70 SECTION AUTHORITY
     71 com.	IN NS	a.gtld-servers.net.
     72 SECTION ADDITIONAL
     73 a.gtld-servers.net.	IN 	A	192.5.6.30
     74 ENTRY_END
     75 RANGE_END
     76 
     77 ; a.gtld-servers.net.
     78 RANGE_BEGIN 0 100
     79 	ADDRESS 192.5.6.30
     80 ENTRY_BEGIN
     81 MATCH opcode qtype qname
     82 ADJUST copy_id
     83 REPLY QR NOERROR
     84 SECTION QUESTION
     85 com. IN NS
     86 SECTION ANSWER
     87 com.	IN NS	a.gtld-servers.net.
     88 SECTION ADDITIONAL
     89 a.gtld-servers.net.	IN 	A	192.5.6.30
     90 ENTRY_END
     91 
     92 ENTRY_BEGIN
     93 MATCH opcode subdomain
     94 ADJUST copy_id copy_query
     95 REPLY QR NOERROR
     96 SECTION QUESTION
     97 example.com. IN NS
     98 SECTION AUTHORITY
     99 example.com.	IN NS	ns.example.com.
    100 SECTION ADDITIONAL
    101 ns.example.com. IN A 1.2.3.44
    102 ENTRY_END
    103 RANGE_END
    104 
    105 ; ns.example.net.
    106 RANGE_BEGIN 0 100
    107 	ADDRESS 1.2.3.44
    108 ENTRY_BEGIN
    109 MATCH opcode qtype qname
    110 ADJUST copy_id
    111 REPLY QR NOERROR
    112 SECTION QUESTION
    113 example.net. IN NS
    114 SECTION ANSWER
    115 example.net.	IN NS	ns.example.net.
    116 SECTION ADDITIONAL
    117 ns.example.net.		IN 	A	1.2.3.44
    118 ENTRY_END
    119 
    120 ENTRY_BEGIN
    121 MATCH opcode qtype qname
    122 ADJUST copy_id
    123 REPLY QR NOERROR
    124 SECTION QUESTION
    125 ns.example.net. IN A
    126 SECTION ANSWER
    127 ns.example.net. IN A	1.2.3.44
    128 SECTION AUTHORITY
    129 example.net.	IN NS	ns.example.net.
    130 ENTRY_END
    131 
    132 ENTRY_BEGIN
    133 MATCH opcode qtype qname
    134 ADJUST copy_id
    135 REPLY QR NOERROR
    136 SECTION QUESTION
    137 ns.example.net. IN AAAA
    138 SECTION AUTHORITY
    139 example.net.	IN NS	ns.example.net.
    140 SECTION ADDITIONAL
    141 www.example.net. IN A	1.2.3.44
    142 ENTRY_END
    143 
    144 ENTRY_BEGIN
    145 MATCH opcode qtype qname
    146 ADJUST copy_id
    147 REPLY QR NOERROR
    148 SECTION QUESTION
    149 example.com. IN NS
    150 SECTION ANSWER
    151 example.com.	IN NS	ns.example.net.
    152 ENTRY_END
    153 
    154 ENTRY_BEGIN
    155 MATCH opcode qtype qname
    156 ADJUST copy_id
    157 REPLY QR NOERROR
    158 SECTION QUESTION
    159 www.example.com. IN A
    160 SECTION ANSWER
    161 www.example.com. IN A	10.20.30.40
    162 ENTRY_END
    163 RANGE_END
    164 
    165 STEP 1 QUERY
    166 ENTRY_BEGIN
    167 REPLY RD
    168 SECTION QUESTION
    169 www.example.com. IN A
    170 ENTRY_END
    171 
    172 ; recursion happens here.
    173 STEP 20 CHECK_ANSWER
    174 ENTRY_BEGIN
    175 MATCH all
    176 REPLY QR RD RA NOERROR
    177 SECTION QUESTION
    178 www.example.com. IN A
    179 SECTION ANSWER
    180 www.example.com. IN A	127.0.0.1
    181 ENTRY_END
    182 
    183 SCENARIO_END
    184