ユーザ用ツール

サイト用ツール


サイドバー

Index

はじめてのおつかい






DokuWiki整形記法


PlayGround



serverapps:dns:powerdns

PowerDNS

このページについて

インストール記録。
途中なので、参考にしないでください。

PowerDNSの動作について

※設定を行う上で分かったことと推測も交えてますので、内容のご利用は自己責任で

  • PowerDNS同士のZoneTransfer
    • DBでのSync推奨1)
    • SuperMaster、SuperSlaveとする必要がある
      • Slave側でsupermasterに登録の必要がある
      • master側でNSの登録とAレコード解決ができる必要がある
      • こうなってない2)とNSとして登録されているサーバにNotifyを飛ばして自身の更新は行わない
    • よって、PowerDNSを適切に使用するためには上位NSなどについてのリーチが必須
    • Zone情報に間違いがあるとZoneTransferしません

これらは、DNS動作としては誤っていない。
しかし、これらの制限からトリッキーな使い方をしようとするとZoneTransferが動作しなくなるので注意。

install and configuratoion

インストール

PowerDNSのインストール

# pkg install powerdns
New packages to be INSTALLED:
      powerdns: x.x.x
      boost-libs: x.x.x
      icu: x.x.x
      postgresql93-client: x.x.x
      perl5: x.x.x
      gettext-runtime: x.x.x
      indexinfo: x.x.x
      botan110: x.x.x
      gmp: x.x.x
      lua52: x.x.x
      libedit: x.x.x

見るとPostgreSQLが標準。3)

PostgreSQLのインストールはこちらのページを参照

確認

/usr/local/etc/pdns/pdns.confに

launch=bind

と書いて、モニタモードで立ち上げてみる

# service pdns onemonitor
Mar 07 17:33:30 Reading random entropy from '/dev/urandom'
Mar 07 17:33:30 Loading '/usr/local/lib/pdns/libbindbackend.so'
Mar 07 17:33:30 [bind2backend] This is the bind backend version 3.4.x (Mar .....) reporting
Mar 07 17:33:30 This is a standalone pdns
Mar 07 17:33:30 UDP server bound to 0.0.0.0:53
Mar 07 17:33:30 TCP server bound to 0.0.0.0:53
Mar 07 17:33:30 PowerDNS Authoritative Server 3.4.8 (jenkins@autotest.powerdns.com) (C) 2001-2015 PowerDNS.COM BV
.....

Role(ユーザ)の追加

# psql postgres
postgres=# CREATE ROLE powerdns WITH LOGIN PASSWORD 'PASSWORD';

DB作成

# psql postgres
postgres=# CREATE DATABASE powerdns OWNER powerdns ENCODING 'UTF8';

スキーマ作成

ここからスキーマ生成SQLを取得して作成。

または

/usr/local/share/doc/powerdns/schema.pgsql.sql を利用

psql -U <user> -d <database name> -a -f /usr/share/doc/powerdns/schema.pgsql.sql

設定

/usr/local/etc/pdns/pdns.conf

launch=gpgsql
gpgsql-host=/run/postgresql # if PostgreSQL is listening to unix socket
# gpgsql-host=127.0.0.1
# gpgsql-port=5432
gpgsql-dbname=<database name>
gpgsql-user=<user to use>
gpgsql-password=

参考

1)
PowerDNS公式も推奨
2)
NSが外部
3)
MySQLを使いたい場合はports/dns/powerdnsでオプション指定してBuild
serverapps/dns/powerdns.txt · 最終更新: 2023/02/15 22:13 by hayashi