Search in this section
This document describes the installation of the DNS REST PowerDNS server on a Linux system.
The DNS REST Power DNS server is the interface between your Power DNS nameserver and AutoDNS. The server is based on the Rest protocol and offers the possibility to update zones or load them from a remote server. Your server has the function of a SLAVE.
The application requires the necessary PowerDNS binaries (pdns_control) and a Java Virtual Machine (JDK) for operation. A further dependency exists to the javad-utils package, which is delivered with the application.
There are no special hardware requirements, but we recommend an x86 system with at least 512 MB memory.
We use the OpenJDK Amazon Corretto-8 to develop our software, therefore we recommend the usage of Amazon Corretto-8. Amazon Corretto is a free, cross-platform and production-ready distribution of the Open Java Development Kit (OpenJDK). Corretto provides long-term support that includes performance enhancements and security fixes. It can be installed easily using the following commands:
First import the repository
rpm --import https://yum.corretto.aws/corretto.key curl -L -o /etc/yum.repos.d/corretto.repo https://yum.corretto.aws/corretto.repo
Finally install the JDK:
yum install java-1.8.0-amazon-corretto-devel
Installation using the package manager yum
yum install dns-rest-powerdns.rpm
The package manager resolves the required dependencies and enables the installation of the necessary programs.
Starting the Server
After the successful installation you can start the server via the INIT script. Configure the server before you start it.
The script is located at
The following options are supported:
- start: starts the server
- stop: stops the server
- restart: restarts the server
- status: shows the status of the server
|CONFIGDIR||configuration files|| |
|APPDIR||program files|| |
The server uses http BASICAuth to authorize the users.
You can define the users and the corresponding passwords in the file
passwd in the configuration directory.
The file uses the following format:
rest-user cannot be changed and must follow the password - it defines the user group which is defined in the server.
Configuration of the Logging
During installation, the file log4j.xml is stored within the configuration directory.
This file defines the log behavior based on the Log4j logger. It writes the log files to
Logging is set to use a maximum of 1GB of disk space, i.e. 10 files with 100 MB each.
If you would like to do the logging e.g. via syslog, we refer you to the Log4j configuration.
Configuration of the PowerDNS Connection
The following parameters are defined under database.properties within the configuration directory. The parameters are based on C3P0. The prefix "default" can be used to define standard parameters for the subsequent data source. A sample configuration is delivered with the RPM. A detailed description of the parameters can be found at http://www.mchange.com/projects/c3p0/index.html#configuration_properties.
|powerdns.pdnsControl||/usr/bin/pdns_control||yes||Location of the PowerDNS Clients file. It allows the use of individual clusters.|
|powerdns.axfrTimeout||50||no||Time period after which the connection setup for a zone transfer is aborted.|
|powerdns.localAxfr||no||Defines the local IP address to be bound, which is used during a zone transfer.|
|powerdns.schemaUpdate||false||no||Enables the automatic creation and update of the PowerDNS database schema depending on the used PowerDNS version.|
|powerdns.version||no||The PowerDNS version used, e.g. 4.1|
Configuration of the PowerDNS Database
Server Start ParametersThe following parameters are defined under database.properties within the configuration directory. The parameters are based on C3P0. The prefix "default" can be used to define standard parameters for the subsequent data source. A sample configuration is delivered with the RPM. A detailed description of the parameters can be found at http://www.mchange.com/projects/c3p0/index.html#configuration_properties.
|default.user||-||yes||The user who has access to the database.|
|default.password||-||yes||The password of the database user.|
|powerdns.jdbcUrl||yes||The connection URL to the DB server, for example "mysql://localhost/powerdns?dontTrackOpenResources=true&jdbcCompliantTruncation=false&zeroDateTimeBehavior=convertToNull&rewriteBatchedStatements=true|
"localhost" represents the host name or IP address of the database server and "powerdns" the corresponding database. The query parameters (everything after the "?") should not be changed.
Server Start Parameters
In the tables the start parameters for the server are defined.
These can be changed in
/etc/sysconfig/javad/dns-rest-powerdns under the PARAM item.
|Port, -p||9090||yes||Port on which the server waits for requests.|
|ssl||false||no||Should HTTPS be used instead of HTTP. With SSL, additional parameters are required.|
|keystore-password||no||Password for the SSL keystore. The password is available as AES encrypted.|
|cert-password||no||Password for the certificate. The password is available as AES encrypted|
|passwd||/etc/javad/dns-rest-powerdns/passwd||yes||Path to user file|
|hostname||0.0.0.0||no||IP address to which the server should bind.|
|USER||AutoDNS||yes||User with which the server is started|
|VMOPTS||-Dconf-dir=file:$CONFIGDIR||yes||Defines JDK specific parameters, e.g. memory consumption|
|PARAMS||See server parameter||yes||Start parameters for the server. See Configuration Server Parameters|