No description
Find a file
crux-capacitor d67e9f8660
Create pillar-with-views.example
An example of the bind pillar that defines multiple views for internal and external record sets.

This doesn't include the other portion of the pillar the defines the bind config - this is zones, views and ACLs only. The config portion is not affected by this.
2018-11-15 08:39:07 -05:00
bind Update named.conf.local.jinja 2018-11-14 11:11:07 -05:00
test/integration/default Move Redhat family logging location to satisfy selinux requirements 2018-08-30 12:25:02 +01:00
.gitignore add Gem lockfile to .gitignore 2018-07-25 16:51:53 +01:00
.kitchen.yml change kitchen reporter from k/v to list 2018-09-26 16:23:26 +02:00
.travis.yml Parallelize travis tests 2018-09-10 08:58:42 -03:00
Gemfile Add missing Gemfile in #94 2018-05-31 14:49:38 +02:00
LICENSE Update Licensing year and remove extra new line characters 2015-05-07 13:44:53 -04:00
pillar-with-views.example Create pillar-with-views.example 2018-11-15 08:39:07 -05:00
pillar.example Add comment about using ACLs and views. 2018-11-14 11:30:13 -05:00
README.rst Update link to example in README.rst 2018-10-26 22:24:42 +02:00

bind

Formulas to set up and configure the bind DNS server.

Available states

bind

Install the bind package and start the bind service.

bind.config

Manage the bind configuration file.

Example Pillar

bind:
  configured_zones:
    example.com:
      type: master
      notify: False
  available_zones:
    example.com:
      file: example.com.txt
      soa:
        ns: ns1.example.com                       # Required
        contact: hostmaster.example.com           # Required
        serial: 2017041001                        # Required
      records:                                    # Records for the zone, grouped by type
        A:
          mx1:                                    # A RR with multiple values can
            - 1.2.3.228                           # be written as an array
            - 1.2.3.229
          cat: 2.3.4.188
          rat: 1.2.3.231
          live: 1.2.3.236
  configured_views:
    myview1:
      match_clients:
        - client1
        - client2
    configured_zones:
      my.zone:
        type: master
        notify: False

See pillar.example for a more complete example.

Management of zone files

named.conf.local

<zone> entries in named.conf.local will point to the file declared in

  • bind:configured_zones:<zone>:file (this takes precedence)
  • bind:available_zones:<zone>:file

zone files

The config.sls state will iterate on bind:available_zones and manage <zone> files for each <zone> that has bind:available_zones:<zone>:file` declared.

  • If bind:available_zones:<zone>:records exist, a zone file will be created using those records (see pillar.example for more details)
  • If bind:available_zones:<zone>:records is NOT declared, bind:available_zones:<zone>:file should point to an existing zone file that will be sourced by the formula.

External zone files

To use an external tool to manage the <zone> file, simply declare the location of the zone file in bind:configured_zones:<zone>:file and don't add any entry for the <zone> in bind:available_zones

DNSSEC

The bind formula currently support two ways to enable DNSSEC:

  • Using the zonesigner binary provided by dnssec-tools (legacy) ;
  • Using internal features of bind.

Here is sample pillar entries to use the latter.

On the master server :

bind:
  lookup:
    key_directory: '/etc/bind/keys'
  config:
    options:
      dnssec-enable: 'yes'
      dnssec-validation: 'yes'
  configured_acls:
    slave_server:
      - 192.168.1.2
  configured_zones:
    domain.tld:
      file: "db.domain.tld"
      type: master
      notify: True
      allow-transfer:
        - localnets
        - localhost
        - slave_server
      allow-update: 'none'
      auto-dnssec: 'maintain'

On the slave server :

bind:
  config:
    options:
      dnssec-enable: 'yes'
      dnssec-validation: 'yes'
  configured_zones:
    domain.tld:
      file: "db.domain.tld.signed"
      type: slave
      masters:
        - master_server
  configured_masters:
    master_server:
      - 192.168.1.1

Notes

  • When using views all zones must be configured in views!

Salt Compatibility

Tested with:

  • 2017.7.x
  • 2018.3.x

OS Compatibility

Tested with:

  • Archlinux
  • CentOS 7
  • Debian-8
  • Debian-9
  • Fedora-27
  • Ubuntu-16.04
  • Ubuntu-18.04