Table of contents

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 name server 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.

System requirements

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.

Recommendation

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

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 /etc/init.d/javad-dns-rest-powerdns.

The following options are supported:

  • start: starts the server
  • stop: stops the server
  • restart: restarts the server
  • status: shows the status of the server

Configuration

Predefined variables

VariableDescriptionDefault Path
CONFIGDIRconfiguration files /etc/javad/dns-rest-powerdns
HOMEhome directory /var/lib/javad/dns-rest-powerdns
APPDIRprogram files /usr/share/java/dns-rest-powerdns

Password configuration

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:

user: password,rest-user

Example: user.one: pwsecret,rest-user

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 /var/log/javad/dns-rest-powerdns.info.log
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.

NameDefaultRequiredDescription
powerdns.pdnsControl/usr/bin/pdns_controlyesLocation of the PowerDNS Clients file. It allows the use of individual clusters.
powerdns.axfrTimeout50noTime period after which the connection setup for a zone transfer is aborted.
powerdns.localAxfr
noDefines the local IP address to be bound, which is used during a zone transfer.
powerdns.schemaUpdatefalsenoEnables the automatic creation and update of the PowerDNS database schema depending on the used PowerDNS version.
powerdns.version
noThe 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.

NameDefaultRequiredDescription
default.user-yesThe user who has access to the database.
default.password-yesThe password of the database user.
powerdns.jdbcUrl
yesThe 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.

NameDefaultRequiredDescription
Port, -p9090yesPort on which the server waits for requests.
sslfalsenoShould HTTPS be used instead of HTTP. With SSL, additional parameters are required.
keystore
noSSL keystore
keystore-password
noPassword for the SSL keystore. The password is available as AES encrypted.
cert-password
noPassword for the certificate. The password is available as AES encrypted
passwd/etc/javad/dns-rest-powerdns/passwdyesPath to user file
hostname0.0.0.0noIP address to which the server should bind.

General parameters

NameDefaultRequiredDescription
USERAutoDNSyesUser with which the server is started
VMOPTS-Dconf-dir=file:$CONFIGDIRyesDefines JDK specific parameters, e.g. memory consumption
PARAMSSee server parameteryesStart parameters for the server. See Configuration Server Parameters