Sunday, December 6, 2009

Konfigurasi DNS-Server Ubuntu 7.10 server

langsung saja ini langkah-langkah nya

1. Sebelum ke penginstalan dan konfigurasi dns-server nya edit terlebih dahulu file /etc/network/interface

root@dns:~#vim /etc/network/interface

akan muncul tampilan seperti dibawah ini

#The network interface
auto eth0
iface eth0 inet static
address 192.168.28.254
network 192.168.28.0
netmask 255.255.255.0
broadcast 192.168.28.255
gateway 192.168.28.254


kemudian tambahkan dibaris paling bawah dns-server=192.168.28.254 dan dns-search rithone.sch.id, dengan konfigurasi seperti dibawah

#The network interface
auto eth0
iface eth0 inet static
address 192.168.28.254
network 192.168.28.0
netmask 255.255.255.0
broadcast 192.168.28.255
gateway 192.168.28.254
dns-server 192.168.28.254 (konfigurasi yang ditambahkan)
dns-search rithone.sch.id (konfigurasi yang ditambahkan)

setelah konfigurasi network selesai, save konfigurasi tersebut

root@dns:~#/etc/ini.d/networking restart

2. edit file /etc/sysctl.conf, untuk forwading dan filetering dns-nya

root@dns:~#vim /etc/sysctl.conf

akan muncul tampilan konfigurasinya, kemudia cari kata-kata

#Uncomment the next line to enable spoof protection (reverse-path filter)
#net.ipv4.conf.default.rp_filter=1

dan

#Uncomment the next line to enable forwadi for ipv4
#net.ipv4.conf.default. forwading=1

kemudian buang tanda # pada kata net.ipv4.conf.default.rp_filter=1 dan net.ipv4.conf.default. forwading=1 sehingga menjadi seperti dibawah ini

#Uncomment the next line to enable spoof protection (reverse-path filter)
net.ipv4.conf.default.rp_filter=1

#Uncomment the next line to enable forwadi for ipv4
#net.ipv4.conf.default. forwading=1

setelah itu save konfigurasi-nya

3.edit file /etc/hosts gunanya untuk mengenalkan domain yang akan kita buat pada server dns

root@dns:~#vim /etc/hosts

buat konfigurasi seperti dibawah

172.0.0.1 localhost
192.168.28.254 rithone.sch.id

kemudian save settingan nya

4.edit file /etc/resolf.conf

root@dns:~#vim /etc/resolf.conf

buat konfigurasi seperti dibawah ini

servername 192.168.28.254
search rithone.sch.id
domain rithone.sch.id

seperti biasa sep settingannya

5.setelah semuanya selesai, coba ping ke-domain tersebut

root@dns:~#ping rithone.sch.id


kalo ripley berarti pengenalan domain ke servernya sudah berhasil, kalo rto (Request Time Out) berarti ada konfigurasi yang salah

6.install software untuk DNS-nya, disini kita gunakan Bind V.9

root@dns:~#apt-get install bind9

7.setelah penginstalan selesai kita buat file zone untuk domain yang kita buat

root@dns:~#vim /etc/bind/named.conf.local

masukan perintah dibawah ini ditempatkan di paling bawah

zone "rithone.sch.id" {
type master;
file "/etc/bind/db.rithone.sch.id";
};

zone "28.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.254.rev"

setelah selesai membuat file zone nya kemudian kita save

8.Langkah selanjut-nya adalah membuat file database db.rithone.sch.id dan db.254.rev

9.Untuk memudahkan membuat database nya copy saja dari file db.local dan db.127

root@dns:~#cp /etc/bind/db.local /etc/bind/db.rithone.sch.id
root@dns:~#cp /etc/bind/db.127 /etc/bind/db.254.rev

10.Setelah dicopy edit kedua file tersebut, yang pertama file db.rithone.sch.id

root@dns:~#vim /etc/bind/db.rithone.sch.id

isi file asalnya adalah sebagai berikut

;
;BIND data file for local loopback in
;
$ 604800
@ IN SOA localhost. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Chace TTL
;
@ IN NS localhost.
@ IN A 172.0.0.1

kemudian rubah menjadi

;
;BIND data file for local loopback in
;
$ 604800
@ IN SOA rithone.sch.id. root.rithone.sch.id. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Chace TTL
;
@ IN NS rithone.sch.id.
@ IN A 192.168.28.254
www IN A 192.168.28.254 (www sebagai alias dari rithone.sch.id)

setelah konfigurasi selesai save semua konfigurasi tersebut

11.Edit file db.254.rev untuk database rev domain

root@dns:~#vim /etc/bind/db.254.rev

konfigurasi awalnya adalah sebagai berikut

;
;BIND data file for local loopback in
;
$ 604800
@ IN SOA localhost. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Chace TTL
;
@ IN NS localhost.
1.0.0 IN PTR localhost.

kemudian rubah menjadi

;
;BIND data file for local loopback in
;
$ 604800
@ IN SOA rithone.sch.id. root.rithone.sch.id. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Chace TTL
;
@ IN NS rithone.sch.id.
254 IN PTR rithone.sch.id.

254 IN PTR www.rithone.sch.id (www.rithone.sch.id adalah sebagai name alias dari rithone.sch.id)

setelah konfigurasi selesai save konfigurasinya

12.Restart servis bind nya

root@dns:~#/etc/init.d/bind9 restart

apabila oke berarti konfigurasi dns telah benar, apabila fail berarti terdapat kesalahan pada konfigurasinya.

13.Tes konfigurasi dns yang kita buat dengan nslookup

root@dns:~#nslookup rithone.sch.id
Server : 192.168.28.254
Address : 192.168.28.254#53

Name : rithone.sch.id
Address : 192.168.28.254

apabila terdapat tampilan seperti diatas, berarti konfigurasi dns telah benar.

14.Install web server apache (apache2) agar dns dapat diakses oleh client atau resolver.

root@dns:~#apt-get install apache2

tunggu sampai proses penginstalan selesai.
15.Tes dari client (client menggunakan windows) dengan catatan ip address dan dns servernya sudah di sesuaikan dengan server.

16.Tes menggunakan web browse, masukan rithone.sch.id di address bar, apabila ada tampilan "its work!" berarti dns kita telah berjalan atau berhasil di akses oleh client

17.Selesai sudah Instalasi dan konfigurasi dns. klo ada kekurangan saya mohon semua pembaca dapat mengkoreksinya karena saya masih newbie alias masih belajar.

wassalam.

0 comments:

Post a Comment

 

Copyright 2012 - Mobile News 1000 | Design by Infozalen