Secondary DNS Server
This section describes how to integrate Plesk with an external Linux-based secondary DNS server.
統合には、Plesk GUI の拡張カタログから入手できる Slave DNS Manager 拡張を使用します。
この拡張は、以下のアルゴリズムで機能します。
- It registers a secondary server in the extension settings.
- The secondary server’s IP address is automatically added to the list of addresses allowed to transfer domain zones from the Plesk server.
- Plesk でアクティブなドメインゾーンを作成、変更、削除すると、Plesk はローカル DNS サービスでこのドメインゾーンを作成、変更、削除します。
- スクリプトが起動し、ドメイン名およびドメインゾーンの作成、変更、削除コマンドを受信します。
- The script initiates the rndc command for each connected secondary server.
- Secondary servers synchronize domain zones with the ones on the Plesk server.
注釈: 以下の指示は Debian Linux を対象としています。他の Linux システムでも手順は同じですが、コマンドと構成ファイルのパスが違う可能性があります。
注釈: サーバに一度にインストールできるのは、Slave DNS Manager、Amazon Route 53、または DigitalOcean DNS のいずれかの拡張のみです。これらはいずれも DNS を管理するため、同時にインストールすると衝突が発生します。
To set up a secondary DNS server, do the following:
-
BIND をインストールします。
apt-get install bind9
-
rndc
での新しいゾーンの作成を許可します。/etc/bind/named.conf.options
ファイルのoptions {}
ディレクティブに、allow-new-zones yes;
と入力します。 -
コントロール指示を受け付ける必要がある IP アドレスを指定し、アクセス可能なすべてのネットワークインターフェースを待ち受けるように BIND を設定します。
/etc/bind/named.conf.local
ファイルに、以下のように入力します。controls { inet * port 953 allow { <plesk_ip>; <another_plesk_ip> 127.0.0.1; }; };
-
以下のコマンドを実行して BIND サービスを再起動します。
invoke-rc.d bind9 restart
-
/etc/bind/rndc.key
ファイルに含まれる秘密鍵を忘れずに覚えておきます。key "rndc-key" { algorithm hmac-md5; secret "vwOxonI4n4CVRUhKAOAAIA=="; };
That’s it, the secondary name server is set up.
注釈: If your Plesk server is behind NAT, the secondary DNS server(s) must be outside of it.
After that, install the extension on the Plesk server. In the extension
settings, add the secondary server and specify its IP address and the secret
key. The extension will create a configuration file with the secondary
server settings for the rndc
utility. From now on, Plesk will
automatically transfer all created, modified, and deleted zones to the
secondary server by executing the following commands for each secondary server:
作成
/usr/sbin/rndc -c slave.config addzone example.com '{ type slave; file "/var/lib/bind/example.com"; masters { <plesk_ip>; }; };'
変更
/usr/sbin/rndc -c slave.config refresh example.com
削除
/usr/sbin/rndc -c slave.config delzone example.com
Now, when you add a domain in Plesk, a DNS zone is automatically created on the secondary server as well as on the primary server.