2017-01-12 04:02:45 +08:00
---
2017-10-11 20:33:17 +08:00
name: BIND
title: BIND Provider
2017-01-12 04:02:45 +08:00
layout: default
jsId: BIND
---
2017-10-11 20:33:17 +08:00
# BIND Provider
2017-10-11 23:59:29 +08:00
This provider maintains a directory with a collection of .zone files.
2017-03-23 00:38:08 +08:00
2017-10-12 00:02:40 +08:00
This provider does not generate or update the named.conf file, nor does it deploy the .zone files to the BIND master.
Both of those tasks are different at each site, so they are best done by a locally-written script.
2017-03-23 00:38:08 +08:00
## Configuration
2017-09-13 22:00:41 +08:00
In your credentials file (`creds.json`), you can specify a `directory` where the provider will look for and create zone files. The default is the `zones` directory where dnscontrol is run.
2017-10-11 23:59:29 +08:00
{% highlight json %}
2017-09-13 22:00:41 +08:00
{
2017-10-11 20:33:52 +08:00
"bind": {
2017-09-13 22:00:41 +08:00
"directory": "myzones"
}
}
{% endhighlight %}
2017-10-11 23:59:29 +08:00
The BIND provider does not require anything in `creds.json` . It does accept some optional metadata via your DNS config when you create the provider:
2017-03-23 00:38:08 +08:00
{% highlight javascript %}
2017-10-11 20:33:52 +08:00
var BIND = NewDnsProvider('bind', 'BIND', {
'default_soa': {
'master': 'ns1.example.tld.',
'mbox': 'sysadmin.example.tld.',
'refresh': 3600,
'retry': 600,
'expire': 604800,
'minttl': 1440,
},
'default_ns': [
'ns1.example.tld.',
'ns2.example.tld.',
'ns3.example.tld.',
'ns4.example.tld.'
]
2017-03-23 00:38:08 +08:00
})
{% endhighlight %}
2017-10-12 00:02:40 +08:00
If you need to customize your SOA or NS records, you can do so with this setup.