20.2. コマンドラインを使用した RootDN アクセス制御プラグインの設定
デフォルトでは、RootDN Access Control プラグインは無効になっています。Directory Manager アカウントのアクセス許可を制限するには、プラグインを有効にして設定します。
手順
RootDN Access Controlプラグインを有効にします。# dsconf -D "cn=Directory Manager" ldap://server.example.com plugin root-dn enableバインドルールを設定します。たとえば、Directory Manager アカウントが IP アドレス
192.0.2.1のホストから午前 6 時から午後 9 時までの間のみログインできるようにするには、次のように入力します。# dsconf -D "cn=Directory Manager" ldap://server.example.com plugin root-dn set --open-time=0600 --close-time=2100 --allow-ip="192.0.2.1"設定できるパラメーターの完全なリストとその説明は、次のように入力してください。
# dsconf -D "cn=Directory Manager" ldap://server.example.com plugin root-dn set --helpインスタンスを再起動します。
# dsctl instance_name restart
検証
許可されていない、または許可された時間範囲外のホストから
cn=Directory Managerとしてクエリーを実行します。[user@192.0.2.2]$ ldapsearch -D "cn=Directory Manager" -W -H ldap://server.example.com -x -b "dc=example,dc=com" Enter LDAP Password: ldap_bind: Server is unwilling to perform (53) additional info: RootDN access control violationDirectory Server がアクセスを拒否した場合、プラグインは期待どおりに動作します。