Something went wrong. Try again.
BIND zone files for Zig 0.16: read one, edit it, write it back
Something went wrong. Try again.
2.7 kB · 75 lines
at main
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576; SPDX-FileCopyrightText: © 2026 Jeffrey C. Ollie <jeff@ocjtech.us>; SPDX-License-Identifier: MIT;; A zone with one of most things in it. Everything here is a record type BIND; also parses, because `zig build differential` puts this same file to; named-compilezone and compares what the two made of it.
$ORIGIN example.com.$TTL 1h
@ IN SOA ns1 hostmaster ( 2024010101 ; serial 2h ; refresh 30m ; retry 2w ; expire 1h ) ; negative caching
IN NS ns1 IN NS ns2.example.net. IN MX 10 mail IN MX 20 mail.example.net. IN TXT "v=spf1 mx -all" IN CAA 0 issue "letsencrypt.org" IN CAA 128 iodef "mailto:hostmaster@example.com" IN A 192.0.2.10 IN AAAA 2001:db8::10
ns1 IN A 192.0.2.1 IN AAAA 2001:db8::1mail IN A 192.0.2.25 IN AAAA 2001:db8::25
; A name with several types on it, and a time to live of its own.www 60 IN A 192.0.2.80 60 IN A 192.0.2.81 60 IN AAAA 2001:db8::80 60 IN HTTPS 1 . alpn="h2,h3" port=443 ipv4hint=192.0.2.80,192.0.2.81 60 IN HTTPS 2 backup.example.net. alpn=h2 no-default-alpn
ftp IN CNAME www*.dev IN A 192.0.2.99
; Service discovery, which is what everything below the underscore is for._sip._tcp IN SRV 10 60 5060 sip1 IN SRV 10 20 5060 sip2_25._tcp.mail IN TLSA 3 1 1 ( 0123456789abcdef0123456789abcdef 0123456789abcdef0123456789abcdef )_dmarc IN TXT "v=DMARC1; p=quarantine; rua=mailto:dmarc@example.com"
sip1 IN A 192.0.2.60sip2 IN A 192.0.2.61
; The keys a host publishes for somewhere else.shell IN A 192.0.2.22 IN SSHFP 4 2 ( a87f1b687ac0e57d2a081a2f2826723034cf3a3a a3a6a5a1a0a9a8a7a6a5a4a3 )
; A delegation, with the glue it needs and the DS that signs it.sub IN NS ns1.sub IN NS ns2.sub IN DS 12345 8 2 ( 49FD46E6C4B45C55D4AC69CBD3CD34AC1AFE51DE 49FD46E6C4B45C55D4AC0102 )ns1.sub IN A 192.0.2.200ns2.sub IN A 192.0.2.201
; A record of a type nobody here has a parser for, written the only way one; can be (RFC 3597).future IN TYPE65280 \# 6 010203040506
; And the syntax a name with punctuation in it needs.a\.b IN TXT "a label with a dot in it"spaces IN TXT "one" "two three" "four\009five"