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 VPS with CentOS 6/7 64 bit Or AlmaLinux 8 64 bit bit Or Ubuntu 22.04 / 24.04 64 bit , 512MB Ram or more, 10GB HDD or more.
You should have at least 2 DNS servers in your setup.
The setup should be as below :
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
We use the repository provided by PowerDNS itself : https://repo.powerdns.com/
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.
- Make the script executable
- Run the script
Add more Slaves to PDNS Master
In order to add more slaves to the existing PowerDNS setup perform the below steps. These instructions are to be run only on the primary nameserver.
- Make the script executable
- Run the script
Parameters breakdown
- After running the script, run the following command to verify installation by running one of the following commands.
OR
OR
https://www.virtualizor.com/docs/admin/configure-powerdns/
Troubleshooting
1. If the installer fails or gives any error then its better to start with fresh VPS setup else it will give issues later on with PDNS sync.
2. 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 (for ubuntu /etc/powerdns/pdns.conf)
If everything is proper then grant privileges for remote login for root user using following commands in primary NS vps :
cat /etc/powerdns/pdns.conf | grep mysql
After getting the mysql password, proceed with login :
[mysql]> use mysql;
[mysql]> GRANT ALL ON *.* TO root@'%' IDENTIFIED BY 'MYSQL-PASS';
[mysql]> FLUSH PRIVILEGES;
'MYSQL-PASS' of master NS can be found within master NS vps as well