Need help for Server Templates

I would like to create personal DNS template to apply them at the virtual server creation.

So i create a server template and i want to set the field “BIND DNS records for new domains” but i don’t know how to fill it. Do you have exemples of how to do that ?

Many thanks.

It’s exactly what i need.

Many thanks :slight_smile:

Hey Mathieu,

Any valid BIND DNS record can be added to or can replace the Virtualmin generated ones. The defaults look soemthing like this:

$ttl 38400 @ IN SOA www.virtualmin.com. root.www.virtualmin.com. ( 1119502166 10800 3600 604800 38400 ) virtualmin.com. IN A 70.86.4.238 www.virtualmin.com. IN A 70.86.4.238 ftp IN A 70.86.4.226 mail IN A 70.86.4.226 @ IN MX 5 mail ns0.virtualmin.com. IN A 70.86.4.226 ns1.virtualmin.com. IN A 69.93.73.170 virtualmin.com. IN NS ns0 virtualmin.com. IN NS ns1 virtualmin.com. IN TXT "v=spf1 a mx ?all"

So, you could add another nameserver like so:

${DOM} IN NS ns0.mydomain.tld

Where ${DOM} is a variable that gets substituted during domain creation–there are several variables you can use in many places throughout server templates. They are documented here:

http://www.virtualmin.com/support/documentation/virtualmin-admin-guide/ch07.html

The only thing about this field that is unique to Virtualmin is the variable substitution. Everything else is just standard BIND record syntax, and any documentation you find for your version of BIND will be useful. If you have complex needs, there is no better book than the O’Reilly book named “DNS and BIND” by Cricket Liu and Paul Albitz. It’s probably the finest tech book I’ve ever read, and I’ve read a lot of tech books (and written one). :wink:

And, of course, you have the collected wisdom of all 2500 or so users here at Virtualmin.com (or, at least, the couple hundred or so that regularly read the forums). Ask about any specific questions you have and we’ll probably be able to guide you.