]> git.saurik.com Git - apple/network_cmds.git/blob - unbound/testdata/autotrust_init_fail.rpl
network_cmds-596.100.2.tar.gz
[apple/network_cmds.git] / unbound / testdata / autotrust_init_fail.rpl
1 ; config options
2 server:
3 target-fetch-policy: "0 0 0 0 0"
4 log-time-ascii: yes
5 stub-zone:
6 name: "."
7 stub-addr: 193.0.14.129 # K.ROOT-SERVERS.NET.
8 ; initial content (say from dig example.com DNSKEY > example.com.key)
9 AUTOTRUST_FILE example.com
10 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
11 example.com. 10800 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
12 AUTOTRUST_END
13 CONFIG_END
14
15 SCENARIO_BEGIN Test autotrust with failed initial trust anchor
16
17 ; K-ROOT
18 RANGE_BEGIN 0 100
19 ADDRESS 193.0.14.129
20 ENTRY_BEGIN
21 MATCH opcode qname qtype
22 ADJUST copy_id copy_query
23 REPLY QR AA
24 SECTION QUESTION
25 . IN NS
26 SECTION ANSWER
27 . IN NS k.root-servers.net.
28 SECTION ADDITIONAL
29 k.root-servers.net IN A 193.0.14.129
30 ENTRY_END
31
32 ENTRY_BEGIN
33 MATCH opcode subdomain
34 ADJUST copy_id copy_query
35 REPLY QR
36 SECTION QUESTION
37 com. IN NS
38 SECTION AUTHORITY
39 com. IN NS a.gtld-servers.net.
40 SECTION ADDITIONAL
41 a.gtld-servers.net. IN A 192.5.6.30
42 ENTRY_END
43 RANGE_END
44
45 ; a.gtld-servers.net.
46 RANGE_BEGIN 0 100
47 ADDRESS 192.5.6.30
48 ENTRY_BEGIN
49 MATCH opcode subdomain
50 ADJUST copy_id copy_query
51 REPLY QR
52 SECTION QUESTION
53 example.com. IN NS
54 SECTION AUTHORITY
55 example.com. IN NS ns.example.com.
56 SECTION ADDITIONAL
57 ns.example.com. IN A 1.2.3.4
58 ENTRY_END
59 RANGE_END
60
61 ; ns.example.com.
62 RANGE_BEGIN 0 100
63 ADDRESS 1.2.3.4
64 ENTRY_BEGIN
65 MATCH opcode qname qtype
66 ADJUST copy_id
67 REPLY QR AA
68 SECTION QUESTION
69 ns.example.com. IN AAAA
70 SECTION ANSWER
71 ns.example.com. IN NSEC nugget.example.com. A NSEC RRSIG
72 ns.example.com. 3600 IN RRSIG NSEC 5 3 3600 20090924111500 20090821111500 30899 example.com. WRUQ5d5aBO5AXbvnfCd0AWfKGvQIuAjT2qydGkUIaLZaiP4nj+JdquEy1nGvBwYQ9gWyP7b6C6UGrUnVcNBpcw== ;{id = 30899}
73 SECTION AUTHORITY
74 example.com. 3600 IN NS ns.example.com.
75 example.com. 3600 IN RRSIG NS 5 2 3600 20090924111500 20090821111500 30899 example.com. J5wxRq0jgwQL6yy530kvo9cHqNAUHV8IF4dvaYZL0bNraO2Oe6dVXqlJl4+cxNHI2TMsstwFPr2Zz8tv6Az2mQ== ;{id = 30899}
76 SECTION ADDITIONAL
77 ENTRY_END
78
79 ENTRY_BEGIN
80 MATCH opcode qname qtype
81 ADJUST copy_id
82 REPLY QR AA
83 SECTION QUESTION
84 ns.example.com. IN A
85 SECTION ANSWER
86 ns.example.com. 3600 IN A 1.2.3.4
87 ns.example.com. 3600 IN RRSIG A 5 3 3600 20090924111500 20090821111500 30899 example.com. JsXbS18oyc0zkVaOWGSFdIQuOsZKflT0GraT9afDPoWLCgH4ApF7jNgfJV7Pqy1sTBRajME5IUAhpANwGBuW4A== ;{id = 30899}
88 SECTION AUTHORITY
89 example.com. 3600 IN NS ns.example.com.
90 example.com. 3600 IN RRSIG NS 5 2 3600 20090924111500 20090821111500 30899 example.com. J5wxRq0jgwQL6yy530kvo9cHqNAUHV8IF4dvaYZL0bNraO2Oe6dVXqlJl4+cxNHI2TMsstwFPr2Zz8tv6Az2mQ== ;{id = 30899}
91 SECTION ADDITIONAL
92 ENTRY_END
93
94 ENTRY_BEGIN
95 MATCH opcode qname qtype
96 ADJUST copy_id
97 REPLY QR AA
98 SECTION QUESTION
99 www.example.com. IN A
100 SECTION ANSWER
101 www.example.com. 3600 IN A 10.20.30.40
102 www.example.com. 3600 IN RRSIG A 5 3 3600 20090924111500 20090821111500 30899 example.com. pYGxVLsWUvOp1wSf0iwPap+JnECfC5GAm1lRqy3YEqecNGld7U7x/5Imo3CerbdZrVptUQs2oH0lcjwYJXMnsw== ;{id = 30899}
103 SECTION AUTHORITY
104 example.com. 3600 IN NS ns.example.com.
105 example.com. 3600 IN RRSIG NS 5 2 3600 20090924111500 20090821111500 30899 example.com. J5wxRq0jgwQL6yy530kvo9cHqNAUHV8IF4dvaYZL0bNraO2Oe6dVXqlJl4+cxNHI2TMsstwFPr2Zz8tv6Az2mQ== ;{id = 30899}
106 SECTION ADDITIONAL
107 ns.example.com. 3600 IN A 1.2.3.4
108 ns.example.com. 3600 IN RRSIG A 5 3 3600 20090924111500 20090821111500 30899 example.com. JsXbS18oyc0zkVaOWGSFdIQuOsZKflT0GraT9afDPoWLCgH4ApF7jNgfJV7Pqy1sTBRajME5IUAhpANwGBuW4A== ;{id = 30899}
109 ENTRY_END
110
111 ENTRY_BEGIN
112 MATCH opcode qname qtype
113 ADJUST copy_id
114 REPLY QR AA SERVFAIL
115 SECTION QUESTION
116 example.com. IN DNSKEY
117 SECTION ANSWER
118 ; KSK 1
119 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
120 ; ZSK 1
121 example.com. 10800 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (ksk), size = 512b}
122 ; signatures
123 example.com. 10800 IN RRSIG DNSKEY 5 2 10800 20090924111500 20090821111500 30899 example.com. b/HK231jIQLX8IhlZfup3r0yhpXaasbPE6LzxoEVVvWaTZWcLmeV8jDIcn0qO7Yvs7bIJN20lwVAV0GcHH3hWQ== ;{id = 30899}
124 example.com. 10800 IN RRSIG DNSKEY 5 2 10800 20090924111500 20090821111500 55582 example.com. PCHme1QLoULxqjhg5tMlpR0qJlBfstEUVq18TtNoKQe9le1YhJ9caheXcTWoK+boLhXxg9u6Yyvq8FboQh0OjA== ;{id = 55582}
125
126 ENTRY_END
127 RANGE_END
128
129 ; set date/time to Aug 24 07:46:40 (2009).
130 STEP 5 TIME_PASSES ELAPSE 1251100000
131 STEP 6 ASSIGN t0 = ${time}
132 STEP 7 ASSIGN probe = ${range 3200 ${timeout} 3600}
133
134 ; the auto probing should have been done now.
135 STEP 8 CHECK_AUTOTRUST example.com
136 FILE_BEGIN
137 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
138 example.com. 10800 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
139 FILE_END
140
141
142 STEP 10 QUERY
143 ENTRY_BEGIN
144 REPLY RD DO
145 SECTION QUESTION
146 www.example.com. IN A
147 ENTRY_END
148
149 STEP 20 CHECK_ANSWER
150 ENTRY_BEGIN
151 MATCH all
152 REPLY QR RD RA DO SERVFAIL
153 SECTION QUESTION
154 www.example.com. IN A
155 SECTION ANSWER
156 ENTRY_END
157
158 ; The autotrust anchor was probed due to the query.
159
160 STEP 30 CHECK_AUTOTRUST example.com
161 FILE_BEGIN
162 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
163 example.com. 10800 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
164 FILE_END
165
166 ; wait and see if autotrust probes (the unchanged) domain again.
167 STEP 40 TIME_PASSES EVAL ${$probe}
168
169 STEP 50 TRAFFIC
170
171 STEP 65 ASSIGN probe2 = ${range 3200 ${timeout} 3600}
172
173 STEP 70 CHECK_AUTOTRUST example.com
174 FILE_BEGIN
175 example.com. 10800 IN DNSKEY 257 3 5 AwEAAc3Z5DQDJpH4oPdNtC4BUQHk50XMD+dHr4r8psHmivIa83hxR5CRgCtd9sENCW9Ae8OIO19xw9t/RPaEAqQa+OE= ;{id = 55582 (ksk), size = 512b}
176 example.com. 10800 IN DNSKEY 256 3 5 AQPQ41chR9DEHt/aIzIFAqanbDlRflJoRs5yz1jFsoRIT7dWf0r+PeDuewdxkszNH6wnU4QL8pfKFRh5PIYVBLK3 ;{id = 30899 (zsk), size = 512b}
177 FILE_END
178
179 SCENARIO_END