BIND template substitution strings

1 post / 0 new
#1 Wed, 03/02/2016 - 02:00
craigh

BIND template substitution strings

The documentation here seems to be out of date and full of broken links, the latter presumably due to the Drupal upgrade. It doesn't, for example, include the ${IP6} substitution variable for an IPv6 IP address that I discovered through trial and error.

But what I'm really looking for is information on creating my own template for BIND in a Server Template. Virtualmin seems to need a full template like this if I don't like the default:

$ttl 38400
@ IN SOA ns1.example.net. hostmaster.example.net. (
1456884310
10800
3600
604800
38400 )
@ IN NS ns1.example.net.
@ IN NS ns2.example.net.
domain.com. IN A 1.2.3.4
www.domain.com. IN A 1.2.3.4
ftp.domain.com. IN A 1.2.3.4
m.domain.com. IN A 1.2.3.4
localhost.domain.com. IN A 127.0.0.1
webmail.domain.com. IN A 1.2.3.4
admin.domain.com. IN A 1.2.3.4
mail.domain.com. IN A 1.2.3.4
domain.com. IN MX 5 mail.domain.com.
domain.com. IN AAAA 2600:1234::5678:4321:9876:xxxx
www.domain.com. IN AAAA 2600:1234::5678:4321:9876:xxxx
ftp.domain.com. IN AAAA 2600:1234::5678:4321:9876:xxxx
m.domain.com. IN AAAA 2600:1234::5678:4321:9876:xxxx
webmail.domain.com. IN AAAA 2600:1234::5678:4321:9876:xxxx
admin.domain.com. IN AAAA 2600:1234::5678:4321:9876:xxxx
mail.domain.com. IN AAAA 2600:1234::5678:4321:9876:xxxx
autoconfig.domain.com. IN A 1.2.3.4
autoconfig.domain.com. IN AAAA 2600:1234::5678:4321:9876:xxxx

However, variables like the contact address ("hostmaster.example.net" here), the serial number, TTLs, etc. are all defined elsewhere in Virtualmin, so what substitution variables do I use so that those values are inserted instead of a literal "1456884310" for the serial number, or a literal "hostmaster.example.net"? I already know about these:

  • ${DOM}
  • ${IP}
  • ${IP6}

However, I'm specifically looking for the substitution variables for values in the SOA record and TTL values ... these parts:

$ttl 38400
@ IN SOA ns1.example.net. hostmaster.example.net. (
1456884310
10800
3600
604800
38400 )

Anyone have any ideas? Thanks.

Craig