UNPKG

amazon-route-53-dns-zone-file

Version:

Makes DNS Zone File easy. Parses and validates BIND zone files and can be extended for custom features. Functionality is modular. Features are made open for extension and closed for runtime mutation. Written in TypeScript.

98 lines (79 loc) 4.27 kB
export const complicated1 = ` $ORIGIN igloo.com. ; foobar - use old-slow-box or new-fast-box if either is ; available, make three quarters of the logins go to ; new-fast-box. _foobar._tcp SRV 0 1 9 old-slow-box.igloo.com. SRV 0 3 9 new-fast-box.igloo.com. ; if neither old-slow-box or new-fast-box is up, switch to ; using the sysdmin's box and the server SRV 1 0 9 sysadmins-box.igloo.com. SRV 1 0 9 server.igloo.com. server A 172.30.79.10 old-slow-box A 172.30.79.11 sysadmins-box A 172.30.79.12 new-fast-box A 172.30.79.13 ; NO other services are supported *._tcp SRV 0 0 0 . *._udp SRV 0 0 0 . `; export const complicated2 = ` $ORIGIN igloo.com. $TTL 1W neither A 1.2.3.4 ns 100 A 2.3.4.5 test IN SPF "v=spf1" "mx:gcloud-node.com." "-all" test1 SPF "v=spf2" "mx:gcloud-node.com." "-all" IN SPF "v=spf3" "mx:gcloud-node.com." "-all " SPF "v=spf4" "mx:gcloud-node.com." "-all" ; "[Invalid Resource Record: FATAL problem: InvalidCharacterString (Value should be enclosed in quotation marks) encountered with '"\" txt \\"quoted\\" record\""', RRSet with DNS name test. is not permitted in zone igloo.com., RRSet with DNS name www. is not permitted in zone igloo.com., RRSet with DNS name test. is not permitted in zone igloo.com., RRSet with DNS name test1. is not permitted in zone igloo.com.]" www 60 IN TXT "\\101\\" www 60 IN CNAME \\008\\99.igloo.com. ; "[RRSet with DNS name mail. is not permitted in zone igloo.com., RRSet with DNS name mail2. is not permitted in zone igloo.com., RRSet with DNS name www. is not permitted in zone igloo.com., RRSet with DNS name www. is not permitted in zone igloo.com., RRSet with DNS name root. is not permitted in zone igloo.com., ... 6 more exception(s).]" mail 86400 IN A 10.0.0.2 mail2 86400 IN A 10.0.0.3 root 86400 IN CNAME @ www 86400 IN A 10.0.0.1 web 86400 IN CNAME www \\097.igloo.com. 60 IN A 1.2.3.4\n\\304.igloo.com. 60 IN A 1.2.3.4 ©.igloo.com. 60 IN A 1.2.3.4 ¿.igloo.com. 60 IN A 1.2.3.4 `; export const complicated3 = ` $ORIGIN igloo.com. ; designates the start of this zone file in the namespace $TTL 1h ; default expiration time of all resource records without their own TTL value ;igloo.com. IN SOA ns.igloo.com. username.igloo.com. ( ; 2007120710 ; serial number of this zone file ; 1d ; secondary refresh (1 day) ; 2h ; secondary retry time in case of a problem (2 hours) ; 4w ; secondary expiration time (4 weeks) ; 1h ; maximum caching time in case of failed lookups (1 hour) ; ) igloo.com. NS ns ; ns.igloo.com is a nameserver for igloo.com igloo.com. NS ns.somewhere.example. ; ns.somewhere.example is a backup nameserver for igloo.com igloo.com. MX 10 mail.igloo.com. ; mail.igloo.com is the mailserver for igloo.com @ MX 20 mail2.igloo.com. ; equivalent to above line, "@" represents zone origin @ MX 50 mail3 ; equivalent to above line, but using a relative host name igloo.com. A 192.0.2.1 ; IPv4 address for igloo.com AAAA 2001:db8:10::1 ; IPv6 address for igloo.com ns A 192.0.2.2 ; IPv4 address for ns.igloo.com AAAA 2001:db8:10::2 ; IPv6 address for ns.igloo.com www CNAME igloo.com. ; www.igloo.com is an alias for igloo.com wwwtest CNAME www ; wwwtest.igloo.com is another alias for www.igloo.com mail A 192.0.2.3 ; IPv4 address for mail.igloo.com, ; any MX record host must be an address record ; as explained in RFC 2181 (section 10.3) mail2 A 192.0.2.4 ; IPv4 address for mail2.igloo.com mail3 A 192.0.2.5 ; IPv4 address for mail3.igloo.com `; export const complicated4 = ` $ORIGIN igloo.com. $TTL 3W @ MX 0 mail1 @ MX 10 mail2 mail A 127.0.0.1 A 1.2.3.4 mail AAAA 2001:db8::1 mail1 CNAME mail mail2 CNAME mail `;