Bind9 后端

此页面记录使用 Bind 9 后端。该后端使用 rndc 实用程序远程创建和删除区域。

rndc 和 Bind 之间的流量使用密钥进行身份验证。

指定配置

Bind9 操作所需的示例配置。每个池目标一个部分

  targets:
    - type: bind9
      description: BIND9 Server 1

      # List out the designate-mdns servers from which BIND servers should
      # request zone transfers (AXFRs) from.
      masters:
        - host: 192.0.2.1
          port: 5354

      # BIND Configuration options
      options:
        host: 192.0.2.2
        port: 53
        rndc_host: 192.0.2.2
        rndc_port: 953
        rndc_key_file: /etc/designate/rndc.key
        clean_zonefile: false

密钥和配置文件相对于运行 Designate 的主机(并且可能与运行 Bind 的主机不同)

然后更新 designate 中的池 - 请参阅 designate-manage pool 以获取有关 designate-manage pool 命令的更多详细信息

$ designate-manage pool update

Bind9 配置

确保 Bind 可以访问 /etc/bind/rndc.conf 和 /etc/bind/rndc.key 文件,并从 Designate 接收 rndc 流量。

通过编辑 named.conf.options 或 named.conf,并在 options 下添加此行来启用 rndc addzone/delzone 功能

allow-new-zones yes;

/etc/bind/rndc.key 的示例配置

key "rndc-key" {
    algorithm hmac-md5;
    secret "<b64-encoded string>";
};