Difference between revisions of "PowerDNS: Instalasi di Ubuntu"

From OnnoWiki
Jump to navigation Jump to search
 
(17 intermediate revisions by the same user not shown)
Line 1: Line 1:
Install PowerDNS On Ubuntu
+
Install PowerDNS di Ubuntu
Scenario:
 
  
Operating system: Ubuntu 14.04 LTS server
+
Operating system: Ubuntu 14.04 LTS server
IP Address: 192.168.1.250/24
+
IP Address: 192.168.0.100/24
Hostname: server.unixmen.local
+
Hostname: refserver
Update your system:
 
  
First of all, update your system:
 
  
sudo apt-get update && sudo apt-get upgrade -y
+
==Update apps==
Setup MySQL:
 
  
sudo apt-get install mysql-server mysql-client
+
sudo apt-get update
During installation you’ll be asked to set MySQL root user password. While it’s not mandatory, It is highly recommended.
+
sudo apt-get upgrade -y
  
sk@server: ~_001
 
  
Re-enter the password.
+
==Instalasi & Setup MySQL==
  
sk@server: ~_002
+
sudo apt-get install mysql-server mysql-client
  
Now, edit /etc/mysql/my.cnf to make MySQL to listen all interfaces.
+
Jika sedang belajar dapat menggunakan password root 123456. Untuk operasional sebaiknya jangan menggunakan password root 123456.
  
sudo vi /etc/mysql/my.cnf
+
Edit /etc/mysql/my.cnf agar MySQL mendengarkan semua interfaces.
Find the following line, and comment it out.
 
  
[...]
+
sudo vi /etc/mysql/my.cnf
#bind-address          = 127.0.0.1
 
[...]
 
Save and close the file. Restart MySQL service.
 
  
sudo service mysql restart
+
Cari kalimat berikut, dan di beri pagar (#).
We completed the installation now. Next, we will Install PowerDNS.
 
  
Install PowerDNS:
+
[...]
 +
#bind-address          = 127.0.0.1
 +
[...]
  
Run the following command to install PowerDNS.
+
Simpan dan tutup file. Restart MySQL service.
  
sudo apt-get install pdns-server pdns-backend-mysql
+
sudo service mysql restart
Press ‘Yes’ to configure database for pdns-backend-mysql with dbconfig-common.
 
  
sk@server: ~_003
+
Selesai sudah proses instalasi MySQL. Selanjutnya kita akan menginstalasi PowerDNS.
  
Provide MySQL root user password:
 
  
sk@server: ~_004
+
==Install PowerDNS==
  
Then, provide a password for pdns-backend-mysql to register with the database serve.
+
Instalasi
  
sk@server: ~_005
+
sudo apt-get install pdns-server pdns-backend-mysql
  
Re-enter password:
+
Lakukan:  
  
sk@server: ~_006
+
* Tekan 'Yes' untuk '''Configure database for pdns-backend-mysql with dbconfig-common?'''
 +
* Masukan password root MySQL (dalam contoh ini 123456).
 +
* Masukan password untuk  pdns-backend-mysql untuk register ke database server. Untuk memudahkan gunakan password '''123456'''
 +
* Ulangi masukan password untuk  pdns-backend-mysql untuk register ke database server.
  
PowerDNS has been installed now.
+
Sekarang PowerDNS sudah di instalasi.
  
Create PowerDNS Database and User in MySQL
 
The next step is we should now create the necessary database, user account, tables, and records etc., for the PowerDNS.
 
  
Enter to MySQL prompt using command:
+
==Create PowerDNS Database dan User di MySQL==
  
sudo mysql -u root -p
+
Masuk ke MySQL
Create database, namely ‘powerdns’. You can define your own.
 
  
CREATE DATABASE powerdns;
+
sudo mysql -u root -p
Create database user, namely ‘poweruser’.
 
  
GRANT ALL ON powerdns.* TO 'poweruser '@'localhost' IDENTIFIED BY 'ubuntu';
+
untuk password root 123456 dapat menggunakan
Here,
 
  
powerdns – is the database;
+
sudo mysql -u root -p123456
  
poweruser – is the database user,
+
Buat database ‘powerdns’. Database user 'poweruser'. Atau kita dapat membuat sendiri juga
  
ubuntu – is the password for the ‘poweruser’ user.
+
CREATE DATABASE powerdns;
 +
GRANT ALL ON powerdns.* TO 'poweruser'@'localhost' IDENTIFIED BY 'ubuntu';
  
I recommend you to use any strong password to tighten the security.
+
Disini,
  
Enter the following command to update the user settings.
+
* powerdns – adalah database;
 +
* poweruser – adalah database user,
 +
* ubuntu – adalah password for the ‘poweruser’ user.
  
FLUSH PRIVILEGES;
+
Sebaiknya menggunakan password yang lebih baik agar security lebih aman.
Now, use the powerdns database with command:
 
  
USE powerdns;
+
Tulis perintah berikut untuk update user settings.
Create the necessary tables and records.
 
  
First, let us create domains table:
+
FLUSH PRIVILEGES;
  
CREATE TABLE domains (
+
Gunakan powerdns database, menggunakan perintah:
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 for domains table:
 
  
CREATE UNIQUE INDEX name_index ON domains(name);
+
USE powerdns;
Create records table:
 
  
CREATE TABLE records (
+
Buat tabel dan record yang dibutuhkan:
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 the following indexes for records table:
 
  
CREATE INDEX rec_name_index ON records(name);
+
CREATE TABLE domains (
CREATE INDEX nametype_index ON records(name,type);
+
  id                    INT AUTO_INCREMENT,
CREATE INDEX domain_id ON records(domain_id);
+
  name                  VARCHAR(255) NOT NULL,
Create the supermasters table:
+
  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)
 +
) Engine=InnoDB;
 +
 +
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,
 +
  disabled              TINYINT(1) DEFAULT 0,
 +
  ordername            VARCHAR(255) BINARY DEFAULT NULL,
 +
  auth                  TINYINT(1) DEFAULT 1,
 +
  PRIMARY KEY (id)
 +
);
 +
 +
CREATE INDEX nametype_index ON records(name,type);
 +
CREATE INDEX domain_id ON records(domain_id);
 +
CREATE INDEX recordorder ON records (domain_id, ordername);
 +
 +
 +
CREATE TABLE supermasters (
 +
  ip                    VARCHAR(64) NOT NULL,
 +
  nameserver            VARCHAR(255) NOT NULL,
 +
  account              VARCHAR(40) NOT NULL,
 +
  PRIMARY KEY (ip, nameserver)
 +
);
 +
 +
 +
CREATE TABLE comments (
 +
  id                    INT AUTO_INCREMENT,
 +
  domain_id            INT NOT NULL,
 +
  name                  VARCHAR(255) NOT NULL,
 +
  type                  VARCHAR(10) NOT NULL,
 +
  modified_at          INT NOT NULL,
 +
  account              VARCHAR(40) NOT NULL,
 +
  comment              VARCHAR(64000) NOT NULL,
 +
  PRIMARY KEY (id)
 +
);
 +
 +
CREATE INDEX comments_domain_id_idx ON comments (domain_id);
 +
CREATE INDEX comments_name_type_idx ON comments (name, type);
 +
CREATE INDEX comments_order_idx ON comments (domain_id, modified_at);
 +
 
 +
 +
CREATE TABLE domainmetadata (
 +
  id                    INT AUTO_INCREMENT,
 +
  domain_id            INT NOT NULL,
 +
  kind                  VARCHAR(32),
 +
  content              TEXT,
 +
  PRIMARY KEY (id)
 +
);
 +
 +
CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind);
 +
 
 +
 +
CREATE TABLE cryptokeys (
 +
  id                    INT AUTO_INCREMENT,
 +
  domain_id            INT NOT NULL,
 +
  flags                INT NOT NULL,
 +
  active                BOOL,
 +
  content              TEXT,
 +
  PRIMARY KEY(id)
 +
);
 +
 +
CREATE INDEX domainidindex ON cryptokeys(domain_id);
 +
 
 +
 +
CREATE TABLE tsigkeys (
 +
  id                    INT AUTO_INCREMENT,
 +
  name                  VARCHAR(255),
 +
  algorithm            VARCHAR(50),
 +
  secret                VARCHAR(255),
 +
  PRIMARY KEY (id)
 +
);
 +
 +
CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm);
  
CREATE TABLE supermasters (
+
Keluar dari MySQL menggunakan perintah:
ip VARCHAR(25) NOT NULL,
 
nameserver VARCHAR(255) NOT NULL,
 
account VARCHAR(40) DEFAULT NULL
 
);
 
Finally, exit from MySQL prompt using command:
 
  
quit;
+
quit;
Configure PowerDNS
 
Now, we should configure PowerDNS to use MySQL as backend to store Zone files and records.
 
  
Remove the existing PowerDNS configuration files.
+
==Konfigurasi PowerDNS==
  
sudo rm /etc/powerdns/pdns.d/*.*
+
Konfigurasi PowerDNS untuk menggunakan MySQL sebagai backend untuk menyimpan file Zone dan records.
Then, create file /etc/powerdns/pdns.d/pdns.local.gmysql.conf file;
 
  
sudo vi /etc/powerdns/pdns.d/pdns.local.gmysql.conf
+
Buang file konfigurasi PowerDNS yang ada.
Add the following lines. Set the correct database name and database user which we created earlier.
 
  
# MySQL Configuration
+
sudo rm /etc/powerdns/pdns.d/*.*
#
 
# Launch gmysql backend
 
launch=gmysql
 
  
# gmysql parameters
+
Buat file /etc/powerdns/pdns.d/pdns.local.gmysql.conf ;
gmysql-host=localhost
 
gmysql-dbname=powerdns
 
gmysql-user=poweruser
 
gmysql-password=ubuntu
 
Finally restart powerdns service.
 
  
sudo service pdns restart
+
sudo vi /etc/powerdns/pdns.d/pdns.local.gmysql.conf
Test PowerDNS
+
 
First, edit /ect/resolv.conf file,
+
Tambahkan kalimat berikut, yang sesuai dengan konfigurasi yang kita lakukan sebelumnya:
 +
 
 +
# MySQL Configuration
 +
#
 +
# Launch gmysql backend
 +
launch=gmysql
 +
 +
# gmysql parameters
 +
gmysql-host=localhost
 +
gmysql-dbname=powerdns
 +
gmysql-user=poweruser
 +
gmysql-password=ubuntu
 +
 
 +
Restart powerdns service.
 +
 
 +
sudo service pdns restart
 +
 
 +
==Test PowerDNS==
 +
 
 +
Edit file /ect/resolv.conf ,
 +
 
 +
sudo vi /etc/resolv.conf
 +
 
 +
isi
 +
 
 +
nameserver 192.168.0.100
 +
 
 +
sesuai dengan IP address server
  
sudo vi /etc/resolv.conf
 
 
Set the name server IP address:
 
Set the name server IP address:
  
auto lo
+
auto lo
iface lo inet loopback
+
iface lo inet loopback
 +
 +
# The primary network interface
 +
auto eth0
 +
iface eth0 inet static
 +
address 192.168.0.100
 +
netmask 255.255.255.0
 +
network 192.168.0.0
 +
broadcast 192.168.0.255
 +
gateway 192.168.0.223
 +
dns-nameservers 192.168.0.223
 +
dns-search home
  
# The primary network interface
+
Kita selesai dengan semua bagian instalasi dan konfigurasi.
auto eth0
+
Selanjutnya, kita perlu cek apakah PowerDNS dapat berjalan dengan baik atau tidak.
iface eth0 inet static
 
address 192.168.1.250
 
netmask 255.255.255.0
 
network 192.168.1.0
 
broadcast 192.168.1.255
 
gateway 192.168.1.1
 
dns-nameservers 192.168.1.250
 
dns-search home
 
We completed all installation and configuration parts. Now, we will check whether PowerDNS is really working or not.
 
  
First check if PowerDNS is listening:
+
Pertama-tama, cek apakah PowerDNS mendengarkan:
  
sudo netstat -tap | grep pdns
+
sudo netstat -tap | grep pdns
Sample output:
 
  
tcp        0      0 *:domain                *:*                    LISTEN      1549/pdns_server-in
+
contoh output:
Now, enter the following command to check PowerDNS is working:
 
  
sudo dig @127.0.0.1
+
tcp        0     0 *:domain                *:*                    LISTEN      4845/pdns_server-in
Or,
 
  
sudo dig @localhost
+
Sekarang, masukan perintah berikut, untuk mencek apakah PowerDNS berjalan dengan baik:
Sample output:
 
  
; <<>> DiG 9.9.5-3-Ubuntu <<>> @127.0.0.1
+
sudo dig @127.0.0.1
; (1 server found)
 
;; global options: +cmd
 
;; Got answer:
 
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 65075
 
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
 
;; WARNING: recursion requested but not available
 
  
;; OPT PSEUDOSECTION:
+
atau,
; EDNS: version: 0, flags:; udp: 2800
 
;; QUESTION SECTION:
 
;.                IN    NS
 
  
;; Query time: 4 msec
+
  sudo dig @localhost
;; SERVER: 127.0.0.1#53(127.0.0.1)
 
;; WHEN: Mon Mar 30 14:38:58 IST 2015
 
;; MSG SIZE rcvd: 29
 
Or,
 
  
sudo dig @192.168.1.250
+
Contoh output:
Where, 192.168.1.250 is my PowerDNS server’s IP address.
 
  
Sample output:
+
; <<>> DiG 9.9.5-3-Ubuntu <<>> @127.0.0.1
 +
; (1 server found)
 +
;; global options: +cmd
 +
;; Got answer:
 +
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16025
 +
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
 +
;; WARNING: recursion requested but not available
 +
 +
;; OPT PSEUDOSECTION:
 +
; EDNS: version: 0, flags:; udp: 2800
 +
;; QUESTION SECTION:
 +
;. IN NS
 +
 +
;; Query time: 4 msec
 +
;; SERVER: 127.0.0.1#53(127.0.0.1)
 +
;; WHEN: Mon Jun 01 09:00:26 WIB 2015
 +
;; MSG SIZE  rcvd: 29
  
; <<>> DiG 9.9.5-3-Ubuntu <<>> @192.168.1.250
+
Or,
; (1 server found)
 
;; global options: +cmd
 
;; Got answer:
 
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 39576
 
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
 
;; WARNING: recursion requested but not available
 
  
;; OPT PSEUDOSECTION:
+
sudo dig @192.168.0.100
; EDNS: version: 0, flags:; udp: 2800
 
;; QUESTION SECTION:
 
;.               IN    NS
 
  
;; Query time: 0 msec
+
Dimana, 192.168.0.100 adalah IP address dari PowerDNS server
;; SERVER: 192.168.1.250#53(192.168.1.250)
 
;; WHEN: Mon Mar 30 14:39:49 IST 2015
 
;; MSG SIZE  rcvd: 29
 
That’s it. PowerDNS is ready to use.
 
  
I have successfully installed and configured PowerDNS, now what? It is time to manage PowerDNS using Poweradmin administration tool.
+
Contoh output:
  
 +
; <<>> DiG 9.9.5-3-Ubuntu <<>> @192.168.0.100
 +
; (1 server found)
 +
;; global options: +cmd
 +
;; Got answer:
 +
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7241
 +
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
 +
;; WARNING: recursion requested but not available
 +
 +
;; OPT PSEUDOSECTION:
 +
; EDNS: version: 0, flags:; udp: 2800
 +
;; QUESTION SECTION:
 +
;. IN NS
 +
 +
;; Query time: 4 msec
 +
;; SERVER: 192.168.0.100#53(192.168.0.100)
 +
;; WHEN: Mon Jun 01 09:01:43 WIB 2015
 +
;; MSG SIZE  rcvd: 29
  
 +
Selesai sudah. PowerDNS siap digunakan.
  
 
==Referensi==
 
==Referensi==
  
 
* http://www.unixmen.com/how-to-install-powerdns-on-ubuntu-14-04/
 
* http://www.unixmen.com/how-to-install-powerdns-on-ubuntu-14-04/

Latest revision as of 09:13, 1 June 2015

Install PowerDNS di Ubuntu

Operating system: Ubuntu 14.04 LTS server
IP Address: 192.168.0.100/24
Hostname: refserver


Update apps

sudo apt-get update
sudo apt-get upgrade -y


Instalasi & Setup MySQL

sudo apt-get install mysql-server mysql-client

Jika sedang belajar dapat menggunakan password root 123456. Untuk operasional sebaiknya jangan menggunakan password root 123456.

Edit /etc/mysql/my.cnf agar MySQL mendengarkan semua interfaces.

sudo vi /etc/mysql/my.cnf

Cari kalimat berikut, dan di beri pagar (#).

[...]
#bind-address           = 127.0.0.1
[...]

Simpan dan tutup file. Restart MySQL service.

sudo service mysql restart

Selesai sudah proses instalasi MySQL. Selanjutnya kita akan menginstalasi PowerDNS.


Install PowerDNS

Instalasi

sudo apt-get install pdns-server pdns-backend-mysql

Lakukan:

  • Tekan 'Yes' untuk Configure database for pdns-backend-mysql with dbconfig-common?
  • Masukan password root MySQL (dalam contoh ini 123456).
  • Masukan password untuk pdns-backend-mysql untuk register ke database server. Untuk memudahkan gunakan password 123456
  • Ulangi masukan password untuk pdns-backend-mysql untuk register ke database server.

Sekarang PowerDNS sudah di instalasi.


Create PowerDNS Database dan User di MySQL

Masuk ke MySQL

sudo mysql -u root -p

untuk password root 123456 dapat menggunakan

sudo mysql -u root -p123456

Buat database ‘powerdns’. Database user 'poweruser'. Atau kita dapat membuat sendiri juga

CREATE DATABASE powerdns;
GRANT ALL ON powerdns.* TO 'poweruser'@'localhost' IDENTIFIED BY 'ubuntu';

Disini,

  • powerdns – adalah database;
  • poweruser – adalah database user,
  • ubuntu – adalah password for the ‘poweruser’ user.

Sebaiknya menggunakan password yang lebih baik agar security lebih aman.

Tulis perintah berikut untuk update user settings.

FLUSH PRIVILEGES;

Gunakan powerdns database, menggunakan perintah:

USE powerdns;

Buat tabel dan record yang dibutuhkan:

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)
) Engine=InnoDB;

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,
  disabled              TINYINT(1) DEFAULT 0,
  ordername             VARCHAR(255) BINARY DEFAULT NULL,
  auth                  TINYINT(1) DEFAULT 1,
  PRIMARY KEY (id)
);

CREATE INDEX nametype_index ON records(name,type);
CREATE INDEX domain_id ON records(domain_id);
CREATE INDEX recordorder ON records (domain_id, ordername); 


CREATE TABLE supermasters (
  ip                    VARCHAR(64) NOT NULL,
  nameserver            VARCHAR(255) NOT NULL,
  account               VARCHAR(40) NOT NULL,
  PRIMARY KEY (ip, nameserver)
);


CREATE TABLE comments (
  id                    INT AUTO_INCREMENT,
  domain_id             INT NOT NULL,
  name                  VARCHAR(255) NOT NULL,
  type                  VARCHAR(10) NOT NULL,
  modified_at           INT NOT NULL,
  account               VARCHAR(40) NOT NULL,
  comment               VARCHAR(64000) NOT NULL,
  PRIMARY KEY (id)
);

CREATE INDEX comments_domain_id_idx ON comments (domain_id);
CREATE INDEX comments_name_type_idx ON comments (name, type);
CREATE INDEX comments_order_idx ON comments (domain_id, modified_at);
 

CREATE TABLE domainmetadata (
  id                    INT AUTO_INCREMENT,
  domain_id             INT NOT NULL,
  kind                  VARCHAR(32),
  content               TEXT,
  PRIMARY KEY (id)
);

CREATE INDEX domainmetadata_idx ON domainmetadata (domain_id, kind);
 

CREATE TABLE cryptokeys (
  id                    INT AUTO_INCREMENT,
  domain_id             INT NOT NULL,
  flags                 INT NOT NULL,
  active                BOOL,
  content               TEXT,
  PRIMARY KEY(id)
);

CREATE INDEX domainidindex ON cryptokeys(domain_id);
 

CREATE TABLE tsigkeys (
  id                    INT AUTO_INCREMENT,
  name                  VARCHAR(255),
  algorithm             VARCHAR(50),
  secret                VARCHAR(255),
  PRIMARY KEY (id)
);

CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm);

Keluar dari MySQL menggunakan perintah:

quit;

Konfigurasi PowerDNS

Konfigurasi PowerDNS untuk menggunakan MySQL sebagai backend untuk menyimpan file Zone dan records.

Buang file konfigurasi PowerDNS yang ada.

sudo rm /etc/powerdns/pdns.d/*.*

Buat file /etc/powerdns/pdns.d/pdns.local.gmysql.conf ;

sudo vi /etc/powerdns/pdns.d/pdns.local.gmysql.conf

Tambahkan kalimat berikut, yang sesuai dengan konfigurasi yang kita lakukan sebelumnya:

# MySQL Configuration
#
# Launch gmysql backend
launch=gmysql

# gmysql parameters
gmysql-host=localhost
gmysql-dbname=powerdns
gmysql-user=poweruser
gmysql-password=ubuntu

Restart powerdns service.

sudo service pdns restart

Test PowerDNS

Edit file /ect/resolv.conf ,

sudo vi /etc/resolv.conf

isi

nameserver 192.168.0.100

sesuai dengan IP address server

Set the name server IP address:

auto lo
iface lo inet loopback

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.100
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.223
dns-nameservers 192.168.0.223
dns-search home

Kita selesai dengan semua bagian instalasi dan konfigurasi. Selanjutnya, kita perlu cek apakah PowerDNS dapat berjalan dengan baik atau tidak.

Pertama-tama, cek apakah PowerDNS mendengarkan:

sudo netstat -tap | grep pdns

contoh output:

tcp        0      0 *:domain                *:*                     LISTEN      4845/pdns_server-in

Sekarang, masukan perintah berikut, untuk mencek apakah PowerDNS berjalan dengan baik:

sudo dig @127.0.0.1

atau,

sudo dig @localhost

Contoh output:

; <<>> DiG 9.9.5-3-Ubuntu <<>> @127.0.0.1
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 16025
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available 

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 2800
;; QUESTION SECTION:
;.				IN	NS

;; Query time: 4 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Mon Jun 01 09:00:26 WIB 2015
;; MSG SIZE  rcvd: 29

Or,

sudo dig @192.168.0.100

Dimana, 192.168.0.100 adalah IP address dari PowerDNS server

Contoh output:

; <<>> DiG 9.9.5-3-Ubuntu <<>> @192.168.0.100
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7241
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 2800
;; QUESTION SECTION:
;.				IN	NS

;; Query time: 4 msec
;; SERVER: 192.168.0.100#53(192.168.0.100)
;; WHEN: Mon Jun 01 09:01:43 WIB 2015
;; MSG SIZE  rcvd: 29

Selesai sudah. PowerDNS siap digunakan.

Referensi