====== Dynamic DNS ====== FIXME We decided to just pay dyn.com for their services, but this info is still valid. http://www.howtoforge.com/installing-powerdns-with-mysql-backend-and-poweradmin-on-centos-5.2 http://www.misdivision.com/blog/create-your-own-dynamic-dns-service-using-powerdns-and-mysql https://www.poweradmin.org http://www.tupa-dns.org/ http://gnudip2.sourceforge.net Here we provide a dynamic DNS service using PowerDNS and MySQL. You will also use two working name servers, presumably your own. ===== Install on CentOS 5 ===== Here we install the packages and set the MySQL root password. Adjust as necessary: yum install pdns pdns-backend-mysql mysql-server vim-enhanced chkconfig mysqld on chkconfig pdns on service mysqld start mysqladmin -u root password 'new-password' mysqladmin -u root -h [your-server-fqdn] password 'new-password' Now we log in to MySQL: mysql -u root -p Now, at the MySQL prompt, we configure MySQL permissions. ^MySQL User ID^Purpose^ |root|Master MySQL Administrator| |powerdns|PowerDNS Database User| |power_admin|PowerAdmin Database User (limited)| Adjust as necessary: CREATE DATABASE powerdns; GRANT ALL ON powerdns.* TO 'powerdns'@'localhost' IDENTIFIED BY 'your_powerdns_password'; GRANT ALL ON powerdns.* TO 'powerdns'@'[your-server-fqdn]' IDENTIFIED BY 'your_powerdns_password'; GRANT SELECT, INSERT, UPDATE, DELETE ON powerdns.* TO 'power_admin'@'localhost' IDENTIFIED BY 'your_power_admin_password'; GRANT SELECT, INSERT, UPDATE, DELETE ON powerdns.* TO 'power_admin'@'[your-server-fqdn]' IDENTIFIED BY 'your_power_admin_password'; FLUSH PRIVILEGES; Now we create the database: USE powerdns; CREATE TABLE domains ( id INT auto_increment, name VARCHAR(255) NOT NULL, master VARCHAR(128) DEFAULT NULL, last_check INT DEFAULT NULL, type VARCHAR(6) NOT NULL, notified_serial INT DEFAULT NULL, account VARCHAR(40) DEFAULT NULL, primary key (id) ); CREATE UNIQUE INDEX name_index ON domains(name); CREATE TABLE records ( id INT auto_increment, domain_id INT DEFAULT NULL, name VARCHAR(255) DEFAULT NULL, type VARCHAR(6) DEFAULT NULL, content VARCHAR(255) DEFAULT NULL, ttl INT DEFAULT NULL, prio INT DEFAULT NULL, change_date INT DEFAULT NULL, primary key(id) ); CREATE INDEX rec_name_index ON records(name); CREATE INDEX nametype_index ON records(name,type); CREATE INDEX domain_id ON records(domain_id); CREATE TABLE supermasters ( ip VARCHAR(25) NOT NULL, nameserver VARCHAR(255) NOT NULL, account VARCHAR(40) DEFAULT NULL ); quit; ===== Configure PowerDNS ===== vim /etc/pdns/pdns.conf Add the following lines to 'Launch' section of pdns.conf: ################################# # launch Which backends to launch and order to query them in # # launch= launch=gmysql gmysql-host=127.0.0.1 gmysql-user=powerdns gmysql-password=your_powerdns_password gmysql-dbname=powerdns Start PowerDNS: service pdns start ===== Install PowerAdmin ===== https://www.poweradmin.org/trac/wiki/GettingPoweradmin ==== Command Line ==== yum install httpd php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt php-mhash gettext php-pear-DB php-pear-MDB2-Driver-mysql Start web server: chkconfig httpd on /etc/init.d/httpd start Get the latest PowerAdmin and install it: wget https://github.com/downloads/poweradmin/poweradmin/poweradmin-2.1.6.tgz tar xvfz poweradmin-2.1.6.tgz mv poweradmin-2.1.6 /var/www/html/poweradmin touch /var/www/html/poweradmin/inc/config.inc.php chown -R apache:apache /var/www/html/poweradmin/ ==== Using a Web Browser ==== Begin the web install using the FQDN or the server's IP address: http://[your-server-fqdn]/poweradmin/install ^Installation Step^Action^ |Installation step 1|Choose your language| |Installation step 2|Read then go to step 3| |Installation step 3|Username: powerdns| | |Password: your_powerdns_password| | |Hostname: localhost| | |Database: powerdns| | |Poweradmin administrator password: your_powerdns_web_admin_password| |Installation step 4|Username: power_admin| | |Password: your_power_admin_password| | |Hostmaster: Your DNS admin e-mail address with '@' changed to '.'| | |Primary nameserver: ns1.yourdomain.com| | |Secondary nameserver: ns2.yourdomain.com| |Installation step 5|Skip this step because we already set it up| |Installation step 6|Read and then go to step 7| |Installation step 7|Read| ==== Finalize the Install ==== Back at the command line: rm -rf /var/www/html/poweradmin/install ===== Using PowerDNS ===== http://[your-server-fqdn]/poweradmin ===== Troubleshooting ===== ==== 403 Error on Install URL ==== touch /.autorelabel reboot