1#!/bin/sh 2 3# Copyright (C) Internet Systems Consortium, Inc. ("ISC") 4# 5# SPDX-License-Identifier: MPL-2.0 6# 7# This Source Code Form is subject to the terms of the Mozilla Public 8# License, v. 2.0. If a copy of the MPL was not distributed with this 9# file, you can obtain one at https://mozilla.org/MPL/2.0/. 10# 11# See the COPYRIGHT file distributed with this work for additional 12# information regarding copyright ownership. 13 14# 15# Set up a test zone 16# 17# Usage: genzone.sh primary-server-number secondary-server-number... 18# 19# e.g., "genzone.sh 2 3 4" means ns2 is the primary and ns3, ns4 20# are secondaries. 21# 22 23primary="$1" 24 25cat <<EOF 26\$TTL 3600 27 28@ 86400 IN SOA ns${primary} hostmaster ( 29 1397051952 ; "SER0" 30 5 31 5 32 1814400 33 3600 ) 34EOF 35 36for n; do 37 cat <<EOF 38@ NS ns${n} 39ns${n} A 10.53.0.${n} 40EOF 41done 42 43cat <<\EOF 44 45; type 1 46a01 A 0.0.0.0 47a02 A 255.255.255.255 48 49; type 2 50; see NS records at top of file 51 52; type 3 53; md01 MD madname 54; MD . 55 56; type 4 57; mf01 MF madname 58; mf01 MF . 59 60; type 5 61cname01 CNAME cname-target. 62cname02 CNAME cname-target 63cname03 CNAME . 64 65; type 6 66; see SOA record at top of file 67 68; type 7 69mb01 MG madname 70mb02 MG . 71 72; type 8 73mg01 MG mgmname 74mg02 MG . 75 76; type 9 77mr01 MR mrname 78mr02 MR . 79 80; type 10 81; NULL RRs are not allowed in master files per RFC1035. 82;null01 NULL 83 84; type 11 85wks01 WKS 10.0.0.1 tcp telnet ftp 0 1 2 86wks02 WKS 10.0.0.1 udp domain 0 1 2 87wks03 WKS 10.0.0.2 tcp 65535 88 89; type 12 90ptr01 PTR @ 91 92; type 13 93hinfo01 HINFO "Generic PC clone" "NetBSD-1.4" 94hinfo02 HINFO PC NetBSD 95 96; type 14 97minfo01 MINFO rmailbx emailbx 98minfo02 MINFO . . 99 100; type 15 101mx01 MX 10 mail 102mx02 MX 10 . 103 104; type 16 105txt01 TXT "foo" 106txt02 TXT "foo" "bar" 107txt03 TXT foo 108txt04 TXT foo bar 109txt05 TXT "foo bar" 110txt06 TXT "foo\032bar" 111txt07 TXT foo\032bar 112txt08 TXT "foo\010bar" 113txt09 TXT foo\010bar 114txt10 TXT foo\ bar 115txt11 TXT "\"foo\"" 116txt12 TXT \"foo\" 117txt13 TXT "foo;" 118txt14 TXT "foo\;" 119txt15 TXT "bar\\;" 120 121; type 17 122rp01 RP mbox-dname txt-dname 123rp02 RP . . 124 125; type 18 126afsdb01 AFSDB 0 hostname 127afsdb02 AFSDB 65535 . 128 129; type 19 130x2501 X25 123456789 131;x2502 X25 "123456789" 132 133; type 20 134isdn01 ISDN "isdn-address" 135isdn02 ISDN "isdn-address" "subaddress" 136isdn03 ISDN isdn-address 137isdn04 ISDN isdn-address subaddress 138 139; type 21 140rt01 RT 0 intermediate-host 141rt02 RT 65535 . 142 143; type 22 144nsap01 NSAP ( 145 0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00 ) 146nsap02 NSAP ( 147 0x47.0005.80.005a00.0000.0001.e133.ffffff000161.00. ) 148;nsap03 NSAP 0x 149 150; type 23 151nsap-ptr01 NSAP-PTR foo. 152nsap-ptr01 NSAP-PTR . 153 154; type 24 155;sig01 SIG NXT 1 3 ( 3600 20000102030405 156; 19961211100908 2143 foo.nil. 157; MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I 158; kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t 159; VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= ) 160 161; type 25 162;key01 KEY 512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY 163; 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV 164; sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg 165; a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= ) 166 167; type 26 168px01 PX 65535 foo. bar. 169px02 PX 65535 . . 170 171; type 27 172gpos01 GPOS -22.6882 116.8652 250.0 173gpos02 GPOS "" "" "" 174 175; type 28 176aaaa01 AAAA ::1 177aaaa02 AAAA fd92:7065:b8e:ffff::5 178 179; type 29 180loc01 LOC 60 9 N 24 39 E 10 20 2000 20 181loc02 LOC 60 09 00.000 N 24 39 00.000 E 10.00m 20.00m ( 182 2000.00m 20.00m ) 183 184; type 30 185;nxt01 NXT a.secure.nil. ( NS SOA MX RRSIG KEY LOC NXT ) 186;nxt02 NXT . NXT NSAP-PTR 187;nxt03 NXT . 1 188;nxt04 NXT . 127 189 190; type 31 191eid01 EID 12 89 AB 192 193; type 32 194nimloc01 NIMLOC 12 89 AB 195 196; type 33 197srv01 SRV 0 0 0 . 198srv02 SRV 65535 65535 65535 old-slow-box 199 200; type 34 201atma01 ATMA +61200000000 202atma02 ATMA +61.2.0000.0000 203atma03 ATMA 1234567890abcdef 204atma04 ATMA f.e.d.c.b.a.0.9.8.7.6.5.4.3.2.1 205 206; type 35 207naptr01 NAPTR 0 0 "" "" "" . 208naptr02 NAPTR 65535 65535 blurgh blorf blllbb foo. 209naptr02 NAPTR 65535 65535 "blurgh" "blorf" "blllbb" foo. 210 211; type 36 212kx01 KX 10 kdc 213kx02 KX 10 . 214 215; type 37 216cert01 CERT 65534 65535 254 ( 217 MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I 218 kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t 219 VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= ) 220; type 38 221a601 A6 0 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 222a601 A6 64 ::ffff:ffff:ffff:ffff foo. 223a601 A6 127 ::1 foo. 224a601 A6 128 . 225 226; type 39 227dname01 DNAME dname-target. 228dname02 DNAME dname-target 229dname03 DNAME . 230 231; type 40 232sink01 SINK 1 0 0 233sink02 SINK 8 0 2 l4ik 234 235; type 41 236; OPT is a meta-type and should never occur in master files. 237 238; type 42 239apl01 APL !1:10.0.0.1/32 1:10.0.0.0/24 240apl02 APL 241 242; type 43 243ds01 DS 12892 5 2 26584835CA80C81C91999F31CFAF2A0E89D4FF1C8FAFD0DDB31A85C7 19277C13 244ds01 NS ns42 245ds02 DS 12892 5 1 7AA4A3F416C2F2391FB7AB0D434F762CD62D1390 246ds02 NS ns43 247 248; type 44 249sshfp01 SSHFP 4 2 C76D8329954DA2835751E371544E963EFDA099080D6C58DD2BFD9A31 6E162C83 250sshfp02 SSHFP 1 2 BF29468C83AC58CCF8C85AB7B3BEB054ECF1E38512B8353AB36471FA 88961DCC 251 252; type 45 253ipseckey01 IPSECKEY 10 1 2 192.0.2.38 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== 254ipseckey02 IPSECKEY 10 0 2 . AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== 255ipseckey03 IPSECKEY ( 10 1 2 256 192.0.2.3 257 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== ) 258ipseckey04 IPSECKEY ( 10 3 2 259 mygateway.example.com. 260 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== ) 261 262ipseckey05 IPSECKEY ( 10 2 2 263 2001:0DB8:0:8002::2000:1 264 AQNRU3mG7TVTO2BkR47usntb102uFJtugbo6BSGvgqt4AQ== ) 265 266; type 46 267rrsig01 RRSIG NSEC 1 3 ( 3600 20000102030405 268 19961211100908 2143 foo.nil. 269 MxFcby9k/yvedMfQgKzhH5er0Mu/vILz45I 270 kskceFGgiWCn/GxHhai6VAuHAoNUz4YoU1t 271 VfSCSqQYn6//11U6Nld80jEeC8aTrO+KKmCaY= ) 272 273; type 47 274nsec01 NSEC a.secure.nil. ( NS SOA MX RRSIG DNSKEY LOC NSEC ) 275nsec02 NSEC . NSEC NSAP-PTR 276nsec03 NSEC . TYPE1 277nsec04 NSEC . TYPE127 278 279; type 48 280@ DNSKEY 512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY 281 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV 282 sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg 283 a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= ) 284 285; type 49 286dhcid01 DHCID ( AAIBY2/AuCccgoJbsaxcQc9TUapptP69l 287 OjxfNuVAA2kjEA= ) 288dhcid02 DHCID ( AAEBOSD+XR3Os/0LozeXVqcNc7FwCfQdW 289 L3b/NaiUDlW2No= ) 290dhcid03 DHCID ( AAABxLmlskllE0MVjd57zHcWmEH3pCQ6V 291 ytcKD//7es/deY= ) 292 293; type 50 2948f1tmio9avcom2k0frp92lgcumak0cad NSEC3 1 0 10 D2CF0294C020CE6C 8FPNS2UCT7FBS643THP2B77PEQ77K6IU A NS SOA MX AAAA RRSIG DNSKEY NSEC3PARAM 295kcd3juae64f9c5csl1kif1htaui7un0g NSEC3 1 0 10 D2CF0294C020CE6C KD5MN2M20340DGO0BL7NTSB8JP4BSC7E 296mr5ukvsk1l37btu4q7b1dfevft4hkqdk NSEC3 1 0 10 D2CF0294C020CE6C MT38J6VG7S0SN5G17MCUF6IQIKFUAJ05 A AAAA RRSIG 297 298; type 51 299; @ NSEC3PARAM 1 0 1 868BCF7ED4108929 300 301; type 52 302tlsa TLSA ( 1 1 2 92003ba34942dc74152e2f2c408d29ec 303 a5a520e7f2e06bb944f4dca346baf63c 304 1b177615d466f6c4b71c216a50292bd5 305 8c9ebdd2f74e38fe51ffd48c43326cbc ) 306 307; type 53 308smimea SMIMEA ( 1 1 2 92003ba34942dc74152e2f2c408d29ec 309 a5a520e7f2e06bb944f4dca346baf63c 310 1b177615d466f6c4b71c216a50292bd5 311 8c9ebdd2f74e38fe51ffd48c43326cbc ) 312 313; type 54 (unassigned) 314 315; type 55 316hip1 HIP ( 2 200100107B1A74DF365639CC39F1D578 317 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D ) 318 319hip2 HIP ( 2 200100107B1A74DF365639CC39F1D578 320 AwEAAbdxyhNuSutc5EMzxTs9LBPCIkOFH8cIvM4p9+LrV4e19WzK00+CI6zBCQTdtWsuxKbWIy87UOoJTwkUs7lBu+Upr1gsNrut79ryra+bSRGQb1slImA8YVJyuIDsj7kwzG7jnERNqnWxZ48AWkskmdHaVDP4BcelrTI3rMXdXF5D 321 rvs.example.com. ) 322 323; type 56 324ninfo01 NINFO "foo" 325ninfo02 NINFO "foo" "bar" 326ninfo03 NINFO foo 327ninfo04 NINFO foo bar 328ninfo05 NINFO "foo bar" 329ninfo06 NINFO "foo\032bar" 330ninfo07 NINFO foo\032bar 331ninfo08 NINFO "foo\010bar" 332ninfo09 NINFO foo\010bar 333ninfo10 NINFO foo\ bar 334ninfo11 NINFO "\"foo\"" 335ninfo12 NINFO \"foo\" 336ninfo13 NINFO "foo;" 337ninfo14 NINFO "foo\;" 338ninfo15 NINFO "bar\\;" 339 340; type 57 341rkey01 RKEY 0 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY 342 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV 343 sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg 344 a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= ) 345 346; type 58 347talink0 TALINK . talink1 348talink1 TALINK talink0 talink2 349talink2 TALINK talink2 . 350 351; type 59 352cds01 CDS 30795 1 1 ( 353 310D27F4D82C1FC2400704EA9939FE6E1CEA 354 A3B9 ) 355 356; type 60 357cdnskey01 CDNSKEY 512 ( 255 1 AQMFD5raczCJHViKtLYhWGz8hMY 358 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV 359 sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg 360 a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= ) 361 362; type 61 363openpgpkey OPENPGPKEY ( AQMFD5raczCJHViKtLYhWGz8hMY 364 9UGRuniJDBzC7w0aRyzWZriO6i2odGWWQVucZqKV 365 sENW91IOW4vqudngPZsY3GvQ/xVA8/7pyFj6b7Esg 366 a60zyGW6LFe9r8n6paHrlG5ojqf0BaqHT+8= ) 367 368;type 62 369csync01 CSYNC 0 0 A NS AAAA 370csync02 CSYNC 0 0 371 372;type 63 373zonemd01 ZONEMD 2019020700 1 1 ( 374 C220B8A6ED5728A971902F7E3D4FD93A 375 DEEA88B0453C2E8E8C863D465AB06CF3 376 4EB95B266398C98B59124FA239CB7EEB 377 ) 378zonemd02 ZONEMD 2019020700 1 2 ( 379 08CFA1115C7B948C4163A901270395EA 380 226A930CD2CBCF2FA9A5E6EB85F37C8A 381 4E114D884E66F176EAB121CB02DB7D65 382 2E0CC4827E7A3204F166B47E5613FD27 383 ) 384 385; type 64 -- 98 (unassigned) 386 387; type 99 388spf01 SPF "v=spf1 -all" 389spf02 SPF "v=spf1" " -all" 390 391; type 100 (UINFO - not implemented by BIND - unknown record format only) 392uinfo01 UINFO \# 1 01 393 394; type 101 (UID - not implemented by BIND - unknown record format only) 395uid01 UID \# 1 02 396 397; type 102 (GID - not implemented by BIND - unknown record format only) 398gid01 GID \# 1 03 399 400; type 103 (UNSPEC - not implemented by BIND - unknown record format only) 401unspec01 UNSPEC \# 1 04 402 403; type 104 404nid NID 10 0014:4fff:ff20:ee64 405 406; type 105 407l32 L32 10 1.2.3.4 408 409; type 106 410l64 L64 10 0014:4fff:ff20:ee64 411 412; type 107 413lp LP 10 example.net. 414 415; type 108 416eui48 EUI48 01-23-45-67-89-ab 417 418; type 109 419eui64 EUI64 01-23-45-67-89-ab-cd-ef 420 421; type 110 -- 248 (unassigned) 422 423; type 249 424; TKEY is a meta-type and should never occur in master files. 425; The text representation is not specified in the draft. 426; This example was written based on the bind9 RR parsing code. 427;tkey01 TKEY 928321914 928321915 ( 428; algorithm-name. ; algorithm 429; 65535 ; mode 430; 0 ; error 431; 3 ; key size 432; aaaa ; key data 433; 3 ; other size 434; bbbb ; other data 435; ) 436;; A TKEY with empty "other data" 437;tkey02 TKEY 928321914 928321915 ( 438; algorithm-name. ; algorithm 439; 65535 ; mode 440; 0 ; error 441; 3 ; key size 442; aaaa ; key data 443; 0 ; other size 444; ; other data 445; ) 446 447; type 255 448; * is a meta-type and should never occur in master files. 449 450; type 256 451uri01 URI 10 20 "https://www.isc.org/" 452uri02 URI 30 40 "https://www.isc.org/HolyCowThisSureIsAVeryLongURIRecordIDontEvenKnowWhatSomeoneWouldEverWantWithSuchAThingButTheSpecificationRequiresThatWesupportItSoHereWeGoTestingItLaLaLaLaLaLaLaSeriouslyThoughWhyWouldYouEvenConsiderUsingAURIThisLongItSeemsLikeASillyIdeaButEnhWhatAreYouGonnaDo/" 453uri03 URI 30 40 "" 454 455; type 257 456caa01 CAA 0 issue "ca.example.net; policy=ev" 457caa02 CAA 128 tbs "Unknown" 458caa03 CAA 128 tbs "" 459 460; type 258 461avc AVC foo:bar 462 463; type 259 464doa01 DOA ( 1234567890 1234567890 1 "image/gif" 465 R0lGODlhKAAZAOMCAGZmZgBmmf///zOZzMz//5nM/zNmmWbM/5nMzMzMzACZ//// 466 /////////////////yH5BAEKAA8ALAAAAAAoABkAAATH8IFJK5U2a4337F5ogRkp 467 noCJrly7PrCKyh8c3HgAhzT35MDbbtO7/IJIHbGiOiaTxVTpSVWWLqNq1UVyapNS 468 1wd3OAxug0LhnCubcVhsxysQnOt4ATpvvzHlFzl1AwODhWeFAgRpen5/UhheAYMF 469 dUB4SFcpGEGGdQeCAqBBLTuSk30EeXd9pEsAbKGxjHqDSE0Sp6ixN4N1BJmbc7lI 470 hmsBich1awPAjkY1SZR8bJWrz382SGqIBQQFQd4IsUTaX+ceuudPEQA7 ) 471doa02 DOA 0 1 2 "" aHR0cHM6Ly93d3cuaXNjLm9yZy8= 472 473; type 260 474amtrelay01 AMTRELAY 0 0 0 475amtrelay02 AMTRELAY 0 1 0 476amtrelay03 AMTRELAY 0 0 1 0.0.0.0 477amtrelay04 AMTRELAY 0 0 2 :: 478amtrelay05 AMTRELAY 0 0 3 example.net. 479amtrelay06 AMTRELAY \# 2 0004 480 481; type 261 482resinfo RESINFO qnamemin exterr=15,16,17 infourl=https://resolver.example.com/guide 483 484; type 262 485wallet WALLET currency-identifer wallet-identifier 486wallet-multiple WALLET currency-identifer1 wallet-identifier1 487wallet-multiple WALLET currency-identifer1 wallet-identifier2 488wallet-multiple WALLET currency-identifer2 wallet-identifier3 489 490; type 265 -- 32767 (unassigned) 491 492; type 32768 493ta TA 30795 1 1 ( 494 310D27F4D82C1FC2400704EA9939FE6E1CEA 495 A3B9 ) 496 497; type 32769 498dlv DLV 30795 1 1 ( 499 310D27F4D82C1FC2400704EA9939FE6E1CEA 500 A3B9 ) 501 502; type 32770 -- 65279 (unassigned) 503 504; type 65280-65534 (private use) 505 506https0 HTTPS 0 example.net. 507https1 HTTPS 1 . port=60 508 509svcb0 SVCB 0 example.net. 510svcb1 SVCB 1 . port=60 511 512; keydata (internal type used for managed keys) 513keydata TYPE65533 \# 0 514keydata TYPE65533 \# 6 010203040506 515keydata TYPE65533 \# 18 010203040506010203040506010203040506 516 517; type 65535 (reserved) 518 519EOF 520