User Tools

Site Tools


network:powerdns

This is an old revision of the document!


Power DNS

Install Packages

apt-get install mysql-server mysql-client
apt-get install pdns-server pdns-backend-mysql pdns-recursor 

Create Database

mysql -p < powerdns.sql
powerdns.sql
CREATE DATABASE powerdns;
 
GRANT ALL ON powerdns.* TO 'power_admin'@'localhost' IDENTIFIED BY 'power_admin_password';
GRANT ALL ON powerdns.* TO 'power_admin'@'localhost.localdomain' IDENTIFIED BY 'power_admin_password';
FLUSH PRIVILEGES;
 
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
);

Config Files

/etc/powerdns/pdns.conf
allow-recursion=10.1.0.0/22,127.0.0.1,192.168.0.0/16
config-dir=/etc/powerdns
daemon=yes
guardian=yes
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=power_admin
gmysql-password=power_admin_password
gmysql-dbname=powerdns
lazy-recursion=yes
local-address=0.0.0.0
local-port=53
module-dir=/usr/lib/powerdns
recursor=127.0.0.1:10053
setgid=pdns
setuid=pdns
slave=yes
slave-cycle-interval=60
socket-dir=/var/run
version-string=powerdns
include=/etc/powerdns/pdns.d
/etc/powerdns/recursor.conf
forward-zones=<WINDOWSDOMAIN>=<WINDOWS_DNS_SERVER>
hint-file=/etc/powerdns/named.root
local-address=127.0.0.1
local-port=10053
quiet=yes
setgid=pdns
setuid=pdns
/etc/powerdns/named.root
;
; ORSN, Open Root Server Network - All rights reserved.
;
;     This file holds the information on root name servers needed to
;     initialize cache of ORSN Internet domain name servers
;
;     This file is made available by ORSN under the following URL
;     http://www.orsn.org/roothint/
;
; Last updated: (Mon Sep 23 15:00:00 2013)
; Related to version of root zone: (2013091601)
; Reference source: (auth01.orsn-servers.eu)
;
;
; (A.ORSN-SERVERS.EU.) housed in (AT), operated by (mySYS Telekom, Austria) ASN: (60587)
; Contact: Jantscher, Martin (m.jantscher@orsn.org)
;
.                         3600000 IN NS   A.ORSN-SERVERS.EU.
A.ORSN-SERVERS.EU.        3600000 IN A    185.29.88.82
A.ORSN-SERVERS.EU.        3600000    AAAA 2a00:a6a0:1:1::6:2
;
; (C.ORSN-SERVERS.EU.) housed in (DE), operated by (whTec, Oberhausen) ASN: (29551)
; Contact: Korves, Tim (t.korves@orsn.org)
;
.                         3600000    NS   C.ORSN-SERVERS.EU.
C.ORSN-SERVERS.EU.        3600000    A    178.19.70.8
C.ORSN-SERVERS.EU.        3600000    AAAA 2a01:440:1:f:178:19:70:8
;
; (D.ORSN-SERVERS.EU.) housed in (NL), operated by (Private) ASN: (16265)
; Contact: Canitez, Omer (o.canitez@orsn.org)
;
.                         3600000    NS   D.ORSN-SERVERS.EU.
D.ORSN-SERVERS.EU.        3600000    A    85.17.122.15
;
; (F.ORSN-SERVERS.EU.) housed in (DE), operated by (First Colo GmbH, Munich, Germany) ASN: (44066)
; Contact: Verges, Martin (m.verges@orsn.org)
;
.                         3600000    NS   F.ORSN-SERVERS.EU.
F.ORSN-SERVERS.EU.        3600000    A    212.224.71.116
F.ORSN-SERVERS.EU.        3600000    AAAA 2a01:7e0:0:100:212:224:71:116
;
; (G.ORSN-SERVERS.EU.) housed in (GR), operated by (ASDA Greece) ASN: (29229)
; Contact: Tsintjelis, Lefteris (lefty.tsintjelis@orsn.org)
;
.                         3600000    NS   G.ORSN-SERVERS.EU.
G.ORSN-SERVERS.EU.        3600000    A    193.93.165.1
;
; (J.ORSN-SERVERS.EU.) housed in (DE), operated by (3Q Medien GmbH) ASN: (8972)
; Contact: Thomas, Julius (j.thomas@orsn.org)
;
.                         3600000    NS   J.ORSN-SERVERS.EU.
J.ORSN-SERVERS.EU.        3600000    A    188.138.82.98
;
; (K.ORSN-SERVERS.EU.) housed in (DE), operated by (Titan Networks GmbH, Hofheim) ASN: (20640)
; Contact: Boffin, Marcel (m.boffin@orsn.org)
;
.                         3600000    NS   K.ORSN-SERVERS.EU.
K.ORSN-SERVERS.EU.        3600000    A    82.206.1.22
K.ORSN-SERVERS.EU.        3600000    AAAA 2001:4b88:9000::
;
; (L.ORSN-SERVERS.EU.) housed in (CH), operated by (JustNet GmbH, Baden, Schweiz) ASN: (44227)
; Contact: May, Pascal (p.may@orsn.org)
;
.                         3600000    NS   L.ORSN-SERVERS.EU.
L.ORSN-SERVERS.EU.        3600000    A    79.99.236.6
;
; (M.ORSN-SERVERS.EU.) housed in (DE), operated by (ORSN) ASN: (12693)
; Contact: Grundmann, Markus (mgrundmann@de.orsn.org)
;
.                         3600000    NS   M.ORSN-SERVERS.EU.
M.ORSN-SERVERS.EU.        3600000    A    82.193.249.196
;
; End of file.
;

Power Admin

aptitude install apache2 libapache2-mod-php5 php5 php5-common php5-curl php5-dev php5-gd php-pear php5-imap php5-mcrypt php5-mhash php5-ming php5-mysql php5-xmlrpc gettext

pear install DB
pear install pear/MDB2#mysql

cd /tmp
wget https://www.poweradmin.org/download/poweradmin-2.1.4.tgz
tar xvfz poweradmin-2.1.4.tgz
mv poweradmin-2.1.4 /var/www/poweradmin
touch /var/www/poweradmin/inc/config.inc.php
chown -R www-data:www-data /var/www/poweradmin/

With a web browser navigate to: http://localhost/poweradmin/install/index.php

network/powerdns.1381331844.txt.gz · Last modified: 2013/10/09 10:17 by tschulz