Using PowerDNS with DNSmanager
From ISPWiki
Contents |
Installing PowerDNS
When installing on a fresh server, select a required version of PowerDNS. If you install on the server with MySQL, add two parameters into /usr/local/ispmgr/etc/dnsmgr.conf:
DBPassword administrator_name_MySQL DBSocket path_to_socket_MySQL
and run the installation process.
Automatic restart of PowerDNS is not required. If this option is on, disable it.
All PowerDNS servers are started by the following command
/usr/local/ispmgr/sbin/mgrctl -m dnsmgr bindip
It is automatically specified into the /etc/rc.local file
Customizing DNSmanager
Specify the record in /usr/local/ispmgr/etc/dnsmgr.conf
DNSserver powerdns
Create a user in MySQL whose privileges will be used to work with the database.
Use the following parameters to configure databases connectivity:
PdnsDBHost <hostname> PdnsDBUser <user> PdnsDBPassword <pass> // user password <user> PdnsDBSocket <socket> // path to MySQL UNIX socket
Please note: MySL specified by a user should be authorized to add and delete databases and tables.
other important parameters:
- path pdns_control default value /usr/local/bin/pdns_control - the path to the pdns_control utility
- path pdns_server default value /usr/local/sbin/pdns_server - the path to pdns_server
- path ConfigDir default value /usr/local/etc/pdns - the directory where name server configuration files should locate
You can also edit the PowerDNS configuration file template, if necessary
/usr/local/ispmgr/etc/pdns.conf.template
DNSmanager creates the PowerDNS server configuration parameters using this template. Please note!!! The file appears when starting DNSmanager for the first time, otherwise it is located in:
/usr/local/ispmgr/etc/dist/pdns.conf.template
Principle of operation
There is no view notion in PowerDNS, hence in order to separate your users you should run separate copies of the server each of them working with a separate configuration file and database.
When creating a new name space, a database and the PowerDNS configuration file, a new copy of the server are created.
A database name corresponds to that of a name space, with the dot changed into the "_" symbol.
The configuration file's name is formed in the same manner, but it has a pdns- prefix and .conf suffix.
For more information about how to customize a name server please visit http://doc.powerdns.com/
Transferring from an existing server with named
We attempted to maximally automate change of a DNS server.
- Stop named and disable the automatic start in the configuration file. This step is required to release the IP-addresses.
- Comment out "DNSserver powerdns" in the configuration file. After transfer has been complete, uncomment it.
- Run the command
/usr/local/ispmgr/sbin/mgrctl -m dnsmgr convert.dns to=powerdns
After a while transfer will start and the zone will run. Please note!!! If the name server has too many zones (more than 1000), we recommend enlarging the slave-cycle-interval parameter. The more the number of zones, the more the evaluation period (one hour for about 100 000 domains). After the primary zones' transfer has been completed, you may set the previous period (one minute).
If something has gone wrong, you can roll back to named.
1) stop the PowerDNS servers
killall pdns_server
2) run named
3) in dnsmgr.conf specify
DNSserver named
4) restart DNSmanager
killall dnsmgr
