Your SlideShare is downloading. ×
  • Like
Introducing Powerdns
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

Introducing Powerdns

  • 1,359 views
Published

These are the slides I used in my local libre user group meetup to introduce PowerDNS to my friends and users from varied backgrounds.

These are the slides I used in my local libre user group meetup to introduce PowerDNS to my friends and users from varied backgrounds.

Published in Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
1,359
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
17
Comments
0
Likes
2

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. POWER DNS SEPT 2013 Anu Bhaskar www.anubhaskar.name Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 2. 2 1.Introduction 2.Domain Name System 3.Database Configuration 4.PowerDNS Configuration 5.PowerAdmin Configuration 6.DNS Record creation AGENDA Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 3. 3 1. Hierarchical distributed naming system for resources connected to network 2.Mainly used to translate domain names to IP addresses 3. Consists of DNS protocol, data structure specifications and data communication exchanges Domain Name System Creative Commons Attribution-ShareAlike 3.0 Unported License.
  • 4. 4 Domain Name System Creative Commons Attribution-ShareAlike 3.0 Unported License. Client (10.10.10.2) DNS (10.10.10.3) Web server (www.example.com) (10.10.10.4) (1)What is the ip address of www.example.com (2) IP address of www.example.com is 10.10.10.4 (3) Connection Established
  • 5. 5 Database Configuration Creative Commons Attribution-ShareAlike 3.0 Unported License. Install MariaDB # yum install MariaDB-server # yum install MariaDB-client Configure MariaDB # vi /etc/my.cnf.d/server.cnf [server] bind-address=127.0.0.1 # service mysql start # /usr/bin/mysql_secure_installation Create an sql script to create mariadb database for storing DNS records # vi /root/pdns.sql CREATE DATABASE pdb; GRANT ALL ON pdb.* TO 'padmin'@'localhost' IDENTIFIED BY 'p1234'; GRANT ALL ON pdb.* TO 'padmin'@'localhost.localdomain' IDENTIFIED BY 'p1234'; FLUSH PRIVILEGES; USE pdb;
  • 6. 6 Database Configuration Creative Commons Attribution-ShareAlike 3.0 Unported License. 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(10) DEFAULT NULL, content VARCHAR(64000) DEFAULT NULL, ttl INT DEFAULT NULL, prio INT DEFAULT NULL, change_date INT DEFAULT NULL, primary key(id) );
  • 7. 7 Database Configuration Creative Commons Attribution-ShareAlike 3.0 Unported License. CREATE INDEX nametype_index ON records(name,type); CREATE INDEX domain_id ON records(domain_id); CREATE TABLE supermasters ( ip VARCHAR(64) NOT NULL, nameserver VARCHAR(255) NOT NULL, account VARCHAR(40) DEFAULT NULL ); Create database from sql script # mysql -u root -p < /root/pdns.sql
  • 8. 8 PowerDNS Configuration Creative Commons Attribution-ShareAlike 3.0 Unported License. Install PowerDNS # yum install pdns pdns-backend-mysql Configure mysql backend credentials in PowerDNS # vi /etc/pdns/pdns.conf launch=gmysql gmysql-host=127.0.0.1 gmysql-user=padmin gmysql-password=p1234 gmysql-dbname=pdb Start PowerDNS # service pdns start
  • 9. 9 PowerAdmin Configuration Creative Commons Attribution-ShareAlike 3.0 Unported License. Install Apache webserver # yum install httpd Install php # yum install php php-devel php-gd php-imap php-ldap php-mysql php-odbc php-pear php-xml php-xmlrpc php-mbstring php-mcrypt gettext php-pear-DB php-pear-MDB2-Driver-mysql Configure Apache webserver # vi /etc/httpd/conf/httpd.conf ServerName 10.10.10.3:80 Start Apache webserver # service httpd start Check php configurations by looking at http://10.10.10.3/info.php after saving below file # vi /var/www/html/info.php <?php phpinfo(); ?>
  • 10. 10 PowerAdmin Configuration Creative Commons Attribution-ShareAlike 3.0 Unported License. Download PowerAdmin # wget https://github.com/downloads/poweradmin/poweradmin/poweradmin-2.1.6.tgz # tar -xvzf poweradmin-2.1.6.tgz # cp -pr poweradmin-2.1.6 /var/www/html/poweradmin # chown -R root:root /var/www/html/poweradmin Login to PowerAdmin web install http://10.10.10.3/poweradmin/install Select option “I prefer to proceed in English” in installation step 1 Proceed to next page in installation step 2 Enter below details in installation step 3 Username=padmin Password=p1234 Database type=MySQL Hostname=127.0.0.1 DB Port=3306 Database=pdb Poweradmin administrator password=admin1234
  • 11. 11 PowerAdmin Configuration Creative Commons Attribution-ShareAlike 3.0 Unported License. Enter below details in installation step 4 Username=admin Password=admin1234 Hostmaster=hostmaster.test.lab Primary nameserver=ns1.test.lab Secondary nameserver=ns2.test.lab Run the sql query displayed in installation step 5 inside MariaDB #mysql -u root -p Save the contents printed on the page to /var/www/html/poweradmin/inc/config.inc.php in installation step 6 Remove install directory and login to poweradmin website using the specified link and credentials in installation step 7 # rm -rf /var/www/html/poweradmin/install
  • 12. 12 DNS record creation Creative Commons Attribution-ShareAlike 3.0 Unported License. Create a master zone example.com and below records in it www.example.com A 192.168.10.10 internal.example.com A 192.168.10.20 mail.example.com MX internal.example.com chat.example.com CNAME www.example.com 192.168.10.20 PTR internal.example.com Install DNS client dig # yum install bind-utils Query PowerDNS server using dig to return above records # dig @10.10.10.3 www.example.com A # dig @10.10.10.3 internal.example.com A # dig @10.10.10.3 mail.example.com MX # dig @10.10.10.3 chat.example.com # dig @10.10.10.3 192.168.10.20.example.com PTR Log in to MariaDB and show stored DNS records in database # mysql -u root -p mysql> use pdb; mysql> select * from domains; mysql> select * from records; mysql> exit;