PowerDNS OpenDBX Backend/Configuration/Basic
From Linuxnetworks
Basic options
There are a few options through the OpenDBX backend can be configured for your environment. Add them to the pdns.conf file located in /etc/powerdns or /usr/local/etc/ (depends on your configuration while compiling):
- opendbx-backend (default "mysql")
- Name of the backend used to connect to the database server. Currently mysql, pgsql, sqlite, sqlite3 and sybase are available.
- opendbx-host-read (default "127.0.0.1")
- One or more host names or IP addresses of the database servers. These hosts will be used for retrieving the records via SELECT queries.
- opendbx-host-write (default "127.0.0.1")
- Same as opendbx-host-read, except for INSERT/UPDATE statements (mostly used by zonetransfers).
- opendbx-port (default "")
- TCP/IP port number where the database server is listening to. Most databases will use their default port if you leave this empty.
- opendbx-database (default "powerdns")
- The database name where all domain and record entries are stored.
- opendbx-username (default "powerdns")
- Name of the user send to the DBMS for authentication.
- opendbx-password (default "")
- Clear text password for authentication in combination with the username.
- opendbx-host (deprecated, default "127.0.0.1")
- Host name or IP address of the database server. This parameter is deprecated in favor of opendbx-host-read and opendbx-host-write.
Example
Configuring PowerDNS is straight forward. You only have to launch the opendbx backend and configure the database connection correctly. The lines below are an example for configuring PowerDNS to connect to a MySQL server:
launch=opendbx opendbx-backend=mysql opendbx-host-read=192.168.1.1 opendbx-host-write=192.168.1.1 opendbx-port=3306 opendbx-database=powerdns opendbx-username=powerdns opendbx-password=secret