Skip to content

BIND

With the bind profile (VALGRID_SERVER=bind), the agent writes a zone list for BIND next to the zone files and, after each change, reloads BIND over BIND's control channel with rndc reload. The agent talks to the control channel itself, so it needs no BIND tools and can run in its own container.

To run it, see Docker Compose or a Linux host.

The starter files

When the agent runs with the bind profile and the files do not exist yet, it writes them into the zone directory. With -init it writes them and exits, so BIND can start before the agent has applied a configuration:

  • named.conf: an authoritative-only configuration (no recursion, no zone transfers) that includes the rndc key and the zone list.
  • rndc.key: a new random key for the control channel.
  • named.zones.conf: the zone list, empty until the agent applies a configuration. The agent keeps it up to date; do not edit it.

The starter named.conf accepts control commands on port 953 from any address that holds the key. Keep that port on a private network, such as the Compose network, and never publish it.

Start BIND with the starter configuration:

named -g -c /var/lib/valgrid/named.conf

The agent never changes or replaces an existing named.conf or rndc.key, so your edits are kept.

Use your own named.conf

To add the zones to an existing BIND, include the agent's zone list in your named.conf:

include "/var/lib/valgrid/named.zones.conf";

Then give the agent the rndc key and the address of your control channel:

VALGRID_SERVER=bind
VALGRID_RNDC_KEY_FILE=/etc/bind/rndc.key
VALGRID_RNDC_ADDRESS=127.0.0.1:953

BIND must see the zone directory at the same path as the agent, and must be able to read the zone files.

The zone's primary name server needs an A or AAAA record when it is inside the zone, for example ns1.corp.internal; BIND refuses to load the zone otherwise, and the agent logs a warning.