Home »

DNS Server

Follow zakki160 wordpress on WordPress.com

## DNS Server Example Configuration in Debian Distribution ##

1. Konfigurasi IP Address :
Ketentuan :
“eth0” = 172.27.23.15/27
gateway “eth0” = 172.27.23.1

“eth1” = 30.100.168.32/27

* Jalankan perintah untuk mengedit file konfigurasi network berikut di user root:
# vim /etc/network/interfaces
* Kemudian editlah file tersebut, dan sesuaikan dengan script berikut:

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address 172.27.23.15
netmask 255.255.255.224
gateway 172.27.23.1

auto eth1
iface eth1 inet static
address 30.100.168.33
netmask 255.255.255.224

* Kemudian simpan file tersebut dan jalankan beberapa perintah berikut:
# echo “nameserver 172.27.23.15” > /etc/resolv.conf
# echo “nameserver 202.134.1.10” > /etc/resolv.conf
# /etc/init.d/networking restart; /etc/init.d/networking restart

==================================

2. Konfigurasi DNS Server
Ketentuan:
* Domain = “www.zakki160.sch.id”
——————————–
* Editlah file “named.conf.local” yang berada di dalam direktori “/etc/bind”, dengan aplikasi editor file “vim” atau “nano”, yaitu sebagai berikut:

# vim /etc/bind/named.conf.local

* Kemudian tambahkan script berikut :
zone “zakki160.sch.id” {
type master;
file “/etc/bind/db.zakki160”;
};

zone “15.23.27.172.in-addr.arpa” {
type master;
file “/etc/bind/db.172”;
};

zone “33.168.100.30.in-addr.arpa” {
type master;
file “/etc/bind/db.30”;
};

######################
* Kemudian simpan file tersebut, dan buatlah tiga “zone file” dengan cara seperti berikut:

root@debian:~# cd /etc/bind
root@debian:/etc/bind# cp db.local db.zakki160
root@debian:/etc/bind# cp db.255 db.172

* Kemudian editlah kedua file tersebut yaitu file “db.zakki160” dan “db.172”, dengan script kurang lebih seperti berikut:

##### file “db.zakki160” #########
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA zakki160.sch.id. root.zakki160.sch.id. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
NS ns.zakki160.sch.id.
;
MX 10 mail.zakki160.sch.id.
;
; IP WAN Translation
;
A 172.27.23.15
www A 172.27.23.15
ftp A 172.27.33.15
mail A 172.27.33.15
ns A 172.27.33.15
debian A 172.27.33.15
;
; IP LAN Translation
;
A 30.100.168.33
www A 30.100.168.33
ftp A 30.100.168.33
mail A 30.100.168.33
ns A 30.100.168.33
debian A 30.100.168.33
zakki160.sch.id TXT “v=spf1 a mx ~all”
debian.zakki160.sch.id TXT “v=spf1 a -all”

################
Kemudian simpan filenya., kemudian editlah file “db.172”

####### File “db.172” #############
;
; BIND reverse data file for broadcast zone
;
$TTL 604800
@ IN SOA zakki160.sch.id. root.zakki160.sch.id. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
NS ns.smktkj.sch.id.
;
;
15.23.27.172 PTR zakki160.sch.id.
15.23.27.172 PTR http://www.zakki160.sch.id.
15.23.27.172 PTR mail.zakki160.sch.id.
15.23.27.172 PTR debian.zakki160.sch.id.
15.23.27.172 PTR ns.zakki160.sch.id.

#####################
Selanjutnya salinlah file “db.172” ke file “db.30” dan editlah file tersebut

##### File “db.30” #########
;
; BIND reverse data file for broadcast zone
;
$TTL 604800
@ IN SOA zakki160.sch.id. root.zakki160.sch.id. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
NS ns.smktkj.sch.id.
;
;
33.168.100.30 PTR zakki160.sch.id.
33.168.100.30 PTR http://www.zakki160.sch.id.
33.168.100.30 PTR mail.zakki160.sch.id.
33.168.100.30 PTR debian.zakki160.sch.id.
33.168.100.30 PTR ns.zakki160.sch.id.

##################
* Simpanlah file tersebut dan lakukan restarting service “bind” :

root@debian:/etc/bind# /etc/init.d/bind9 restart
Stopping domain name service…: bind9 waiting for pid 2868 to die.
Starting domain name service…: bind9.
root@debian:/etc/bind#

###### Keterangan #########
Jika saat restarting service “Bind9” terdapat tulisan “failed”, artinya terdapat masalah pada file “/etc/bind/named.conf.local” atau “named.conf”

####################
* Langkah selanjutnya testing domain dengan perintah “nslookup”

root@debian:/etc/bind# nslookup http://www.zakki160.sch.id
Server: 172.27.23.15
Address: 172.27.23.15#53
Name: http://www.zakki160.sch.id
Address: 172.27.23.15
Name: http://www.zakki160.sch.id
Address: 30.100.168.33

####################
jika output dari perintah “nslookup” seperti diatas, maka bisa dinyatakan bahwa konfigurasi DNS Server telah berhasil..,


Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: