rndc。

BINDの設定を復元し,いざ動かすと, /var/log/messages にこんな見慣れない文句が…

Jun  4 15:35:27 konkon named[66283]: couldn't add command channel 127.0.0.1#953: not found
Jun  4 15:35:27 konkon named[66283]: couldn't add command channel ::1#953: not found

一応おなまへの正/逆引きはできているが,なんとなく気持ち悪い。ぐぐったところ,次の準備が要るさうだ。

  1. # rndc-confgen
    # Start of rndc.conf
    key "rndc-key" {
            algorithm hmac-md5;
            secret "wERenoTw0ta";
    };
    
    options {
            default-key "rndc-key";
            default-server 127.0.0.1;
            default-port 953;
    };
    # End of rndc.conf
    
    # Use with the following in named.conf, adjusting the allow list as needed:
    # key "rndc-key" {
    #       algorithm hmac-md5;
    #       secret "wERenoTw0ta";
    # };
    # 
    # controls {
    #       inet 127.0.0.1 port 953
    #               allow { 127.0.0.1; } keys { "rndc-key"; };
    # };
    # End of named.conf
    secret に続く文字列は, rndc-confgen を実行するごとに変わる。
  2. 1. の前半をそのまま /usr/local/etc/rndc.conf にし,後半は先頭の # を取っ払って /etc/namedb/named.conf へ書き足す。
  3. /etc/namedb/rndc.key がなければ…
    # touch /etc/namedb/rndc.key
    # chmod 600 /etc/namedb/rndc.key