DCImanager Administrator

Integration with PowerDNS module

ISPSystem

For some Internet services (e.g. sending email), on dedicated servers it is necessary to convert IP addresses into domain names. To perform this conversion, you need to configure DCImanager integration with the DNS server.

DCImanager supports integration with PowerDNS. PowerDNS is a high-performance, free, open-source DNS server. Read more about PowerDNS in the official documentation. You can install PowerDNS on a separate server or run it on a server with DCImanager in a separate docker container.

After the integration, PTR records will be created on the DNS server, converting dedicated servers addresses into domain names.

Matching of IP address and reverse domain name


To determine a domain name by IP address, the DNS server uses a PTR record of the reverse domain zone. To execute the request, the node address is converted to the reverse form. The translation method depends on the IP version.

IPv4

IPv4 address is written as four decimal numbers from 0 to 255, separated by dots. E.g., 192.168.0.1. To search for domain names by IPv4 addresses, the domain "in-addr.arpa." is used. The IP address is written in the domain name in reverse order. For example, the address 195.161.72.28 corresponds to the domain name "28.72.161.195.inaddr.arpa.".

IPv6

The IPv6 address is written as eight hexadecimal numbers from 0 to ffff, separated by colons. E.g., 3107:0c38:0a67:0000:0000:e446:3925:0091. To search for domain names by IPv6 addresses, the domain "ip6.arpa." is used. The IP address is written in the domain name in reverse order. For example, the address 3107:0c38:0a67:0000:0000:e446:3925:0091 corresponds to the domain name "1.9.0.0.5.2.9.3.6.4.4.e.0.0.0.0.0.0.0.7.6.a.0.8.3.c.0.7.0.1.3.ip6.arpa".

Configuring PowerDNS


Note

In the basic configuration PowerDNS uses BIND as the backend. BIND does not support API write requests via HTTP, so it is not suitable for integration setup. To set up the integration, change the backend to Generic Mysql, Generic Postgresql or Generic SQLite3. Read more in the official PowerDNS documentation.

To find out which backend PowerDNS uses, check the value of the launch parameter in the configuration file /etc/pdns/pdns.conf.

If PowerDNS is installed on the server with DCImanager

  1. Create a /opt/ispsystem/dci/powerdns.yaml file:

    Configuration example
    version: "3.7"
    services:
      powerdns_mysql:
        image: mysql:5
        restart: always
        volumes:
        - /var/lib/powerdns_mysql:/var/lib/mysql
        environment:
          MYSQL_DATABASE: pdns
          MYSQL_ROOT_PASSWORD: <mysql_pass>
        networks:
          - auth
      powerdns_server:
        image: psitrax/powerdns
        restart: always
        environment:
          MYSQL_HOST: powerdns_mysql
          MYSQL_USER: root
          MYSQL_PASS: <mysql_pass>
          MYSQL_DB: pdns
        command: ["--api=yes", "--api-key=<pdns_api_key>", "--webserver=yes", "--webserver-port=<pdns_port>", "--webserver-address=0.0.0.0", "--webserver-allow-from=0.0.0.0/0"]
        ports:
          - "53:53"
          - "<pdns_port>:<pdns_port>"
        networks:
          - auth
    networks:
      auth:

    <mysql_pass> — MySQL password

    <pdns_api_key> — PowerDNS API access key. The minimum length is 6 characters.

    <pdns_port> — access port to the built-in PowerDNS web server

  2. Run a command:

    docker-compose -f powerdns.yaml up -d

If PowerDNS is installed on a separate server

  1. Allow access to the PowerDNS API. To do this, add lines to the configuration file /etc/pdns/pdns.conf:

    api=yes
    api-key=<pdns_api_key> 
    webserver=yes
    webserver-port=<pdns_port>
    webserver-address=0.0.0.0
    webserver-allow-from=0.0.0.0/0

    <pdns_api_key> — PowerDNS API access key. The minimum length is 6 characters.

    <pdns_port> — access port to the built-in PowerDNS web server

  2. Restart PowerDNS:

    systemctl restart pdns.service
  3. Open the web server port in the firewall:

    firewall-cmd --permanent --zone=public --add-port=<pdns_port>/tcp && firewall-cmd --reload

    <pdns_port> — access port to the built-in PowerDNS web server

Configuring DCImanager


On the server with DCImanager:

  1. Install the "Integration with PowerDNS" module: ModulesIntegration with PowerDNSInstall.
  2. Press Configure and specify PowerDNS API connection settings:
    1. Domain name or IP address.
    2. Connection Port.
    3. API key.
    4. Name servers.
  3. Press Apply.

Note

If you use the Integration with IPmanager 6 module, install the Integration with PowerDNS module with the same settings in VMmanager. For more information on installing the module, see the article Integration with PowerDNS in VMmanager documentation.

Diagnostics


DCImanager integration with PowerDNS is performed by the DNSProxy service. You can check the operation of service via the log files in the dci_dns_proxy_1 docker container on the server with DCImanager:

  • /var/log/dns_proxy_integration.log

  • /var/log/dns_proxy_service_1_reader.log

  • /var/log/dns_proxy_service_1_writer.log

Thank you for your feedback!
Was the article useful?
Tell us why not:

it does not match the title

it was hard to understand

I didn't find the answer

recommendations from the article did not help

other

Tell us what you didn't like in the article: