User Tools

Site Tools


internet:hosting:dyndns

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
internet:hosting:dyndns [2012/06/22 13:45]
gcooper
internet:hosting:dyndns [2012/06/23 12:07] (current)
gcooper
Line 1: Line 1:
 ====== Dynamic DNS ====== ====== 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 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 http://gnudip2.sourceforge.net
  
 Here we provide a dynamic DNS service using PowerDNS and MySQL. 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 ===== ===== Install on CentOS 5 =====
 +
 +Here we install the packages and set the MySQL root password.  Adjust as necessary:
  
 <file> <file>
Line 13: Line 25:
  
 chkconfig mysqld on chkconfig mysqld on
 +chkconfig pdns on
 service mysqld start service mysqld start
 mysqladmin -u root password 'new-password' mysqladmin -u root password 'new-password'
-mysqladmin -u root -h <your-server-fqdn> password 'new-password'+mysqladmin -u root -h [your-server-fqdn] password 'new-password' 
 +</file> 
 + 
 +Now we log in to MySQL: 
 + 
 +<file> 
 +mysql -u root -p 
 +</file> 
 + 
 +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: 
 + 
 +<file> 
 +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; 
 +</file> 
 + 
 +Now we create the database: 
 + 
 +<file> 
 +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; 
 +</file> 
 + 
 +===== Configure PowerDNS ===== 
 + 
 +<file> 
 +vim /etc/pdns/pdns.conf 
 +</file> 
 + 
 +Add the following lines to 'Launch' section of pdns.conf: 
 + 
 +<file> 
 +################################# 
 +# 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 
 +</file> 
 + 
 +Start PowerDNS: 
 + 
 +<file> 
 +service pdns start 
 +</file> 
 + 
 +===== Install PowerAdmin ===== 
 + 
 +https://www.poweradmin.org/trac/wiki/GettingPoweradmin 
 + 
 +==== Command Line ==== 
 + 
 +<file> 
 +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 
 +</file> 
 + 
 +Start web server: 
 + 
 +<file> 
 +chkconfig httpd on 
 +/etc/init.d/httpd start 
 +</file> 
 + 
 +Get the latest PowerAdmin and install it: 
 + 
 +<file> 
 +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/ 
 +</file> 
 + 
 +==== 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: 
 + 
 +<file> 
 +rm -rf /var/www/html/poweradmin/install 
 +</file> 
 + 
 +===== Using PowerDNS ===== 
 + 
 +http://[your-server-fqdn]/poweradmin 
 + 
 +===== Troubleshooting ===== 
 + 
 +==== 403 Error on Install URL ==== 
 + 
 +<file> 
 +touch /.autorelabel 
 +reboot
 </file> </file>
internet/hosting/dyndns.1340394346.txt.gz · Last modified: 2012/06/22 13:45 by gcooper