Get Virtualizor

This page explains how to setup PowerDNS for Virtualizor. The Virtualizor-PDNS install script will install PowerDNS, MySql and other dependencies and will setup database replication between the primary and secondary nameservers.


Create two small VPSs with CentOS 6/7 64 bit, 512MB Ram, 10GB HDD.
You should have at least 2 DNS servers in your setup.

The setup should be as below :

  • One VPS for primary nameserver
  • One VPS for secondary nameserver
  • SSH access to both VPSs and should be ping-able to each other
  • SSH port, DNS port (53) and MySQL Database port (3306) must be unblocked on both PDNS servers
eg On CentOS 7, you can run below command to unblock ports 3306 and 53:

firewall-cmd --add-port 3306/tcp --permanent 
firewall-cmd --add-port 53/tcp --permanent 
firewall-cmd --add-port 53/udp --permanent 

firewall-cmd --reload

NOTE: Virtualizor PowerDNS can be installed ONLY on 64 bit Machines.
We use the repository provided by PowerDNS itself :


These instructions are to be run only on the primary nameserver.

  • Download the Virtualizor PowerDNS install script onto the VPS that you have assigned to be your primary nameserver.
  • The PowerDNS install script executed on the primary name server will automatically install and configure the secondary nameserver .Make sure you have pass the correct parameters of the secondary server.
root> wget
  • Make the script executable
root> chmod +x
  • Run the script
root> ./ --mysql-username=root --mysql-password='password' \ --slavens-rootpass='password' 

Note : All the arguments are compulsory. All the parameters to be specified on the same line.

Parameters breakdown

Name Description
--mysql-username This needs to be the mysql username of the primary nameserver. This is mostly root.
--mysql-password This needs to be the mysql root password of the primary nameserver,
specified within single quotes (' ')
--virt-serverip This needs to be the IP Address of the server on which Virtualizor is installed.
--masterns-ip This needs to be the IP Address of the primary nameserver.
--slavens-ip This needs to be the IP Address of the secondary nameserver.
--slavens-rootpass This needs to be the root(not mysql) password of the secondary nameserver,
specified within single quotes (' ')
  • After running the script, run the following command to verify installation by running one of the following commands.
$ service pdns status


$ systemctl status pdns


$ /etc/init.d/pdns status

Next : To Configure powerDNS in virtualizor please refer the below guide :


If panel is not able to reach PDNS vps then try to telnet 3306 port of primary NS vps from Master server.
If it is getting refused it's probably an issue with firewall of VPS/Master server .
You can also verify if pdns service is started or not within NS vps.
Mysql logs are under /var/log/ on both pdns vpses.
Mysql config is /etc/my.cnf and pdns conf is /etc/pdns/pdns.conf

If everything is proper then grant privileges for remote login for root user using following commands in primary NS vps :

mysql -u root -p
[mysql]> use mysql;

'MYSQL-PASS' of master NS can be found within master NS vps as well :

cat /etc/pdns/pdns.conf | grep gmysql

    Was this page helpful?
    Newsletter Subscription
    Subscribing you to the mailing list