TinyDNS

A quick guide to TinyDNS's zonefile format. It's pretty simple.

All records can have a TTL (time-to-live) value, or a timestamp of when the record should expire, and optionally a location if you wish to do location-specific records (I haven't bothered to document that, just Google). Most of the time, unless you need to control it specifically, you can omit the TTL values safely and let TinyDNS use something appropriate.

A records

+fqdn:ip:ttl:timestamp:lo

Alias fqdn with IP address ip. This is just like =fqdn:ip:ttl (see next section, “A + PTR records”) except that tinydns-data does not create the PTR record, just the A record.

Example:

+badger.example.com:10.1.1.2

creates an A record showing 10.1.1.2 as another IP address for badger.example.com.

CNAME records

Cfqdn:p:ttl:timestamp:lo

CNAME (canonical name) record for fqdn. tinydns-data creates a CNAME record for fqdn pointing to the domain name p.

Don't use Cfqdn if there are any other records for fqdn. Don't use Cfqdn for common aliases; use +fqdn instead.

Example:

Cbadger.example.com:snake.example.com

Creates badger.example.com as a CNAME for snake.example.com.

A + PTR record

=fqdn:ip:ttl:timestamp:lo

Host fqdn with IP address ip. tinydns-data creates:

  • an A record showing ip as the IP address of fqdn and
  • a PTR (pointer) record showing fqdn as the name of d.c.b.a.in-addr.arpa if ip is a.b.c.d.

Remember to specify name servers for some suffix of fqdn; otherwise tinydns will not respond to queries about fqdn. The same comment applies to other records described below. Similarly, remember to specify name servers for some suffix of d.c.b.a.in-addr.arpa, if that domain has been delegated to you.

Example:

=badger.example.com:10.1.1.1

creates an A record showing 10.1.1.1 as the IP address of badger.example.com, and a PTR record showing badger.example.com as the name of 10.1.1.1.in-addr.arpa.

Nameserver (NS) records

.fqdn:ip:x:ttl:timestamp:lo

Name server for our domain fqdn. tinydns-data creates

  • an NS (name server) record showing x.ns.fqdn as a name server for fqdn;
  • an A (address) record showing ip as the IP address of x.ns.fqdn; and
  • an SOA (start of authority) record for fqdn listing x.ns.fqdn as the primary name server and hostmaster@fqdn as the contact address.

You may have several name servers for one domain, with a different x for each server. tinydns will return only one SOA record per domain.

If x contains a dot then tinydns-data will use x as the server name rather than x.ns.fqdn. This feature is provided only for compatibility reasons; names not ending with fqdn will force clients to contact parent servers much more often than they otherwise would, and will reduce the overall reliability of DNS. You should omit ip if x has IP addresses assigned elsewhere in data; in this case, tinydns-data will omit the A record.

MX records

@fqdn:ip:x:dist:ttl:timestamp:lo

Mail exchanger for fqdn. tinydns-data creates

  • an MX (mail exchanger) record showing x.mx.fqdn as a mail exchanger for fqdn at distance dist and
  • an A record showing ip as the IP address of x.mx.fqdn.

If you only have one MX record you may omit dist; the default distance is 0.

If x contains a dot then it is treated specially; see above.

You may create several MX records for fqdn, with a different x for each server. Make sure to arrange for the SMTP server on each IP address to accept mail for fqdn.

Example:

@example.com:10.1.1.3:mail.example.com

creates an MX record showing mail.example.com as a mail exchanger for example.com at distance 0, and an A record showing 10.1.1.3 as the IP address of mail.example.com.

TXT records

'fqdn:s:ttl:timestamp:lo

TXT (``text'') record for fqdn. tinydns-data creates a TXT record for fqdn containing the string s. You may use octal \nnn codes to include arbitrary bytes inside s; for example, \072 is a colon.

PTR records

^fqdn:p:ttl:timestamp:lo

PTR record for fqdn. tinydns-data creates a PTR record for fqdn pointing to the domain name p.

 
linux/tinydns.txt · Last modified: 2010/02/26 10:45 (external edit)
 
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki