Jumat, November 06, 2009

Domain Name Server (DNS)

Hari pertama, ketika belajar server, saya mencoba Domain Name Server (DNS). DNS digunakan untuk translasi dari IP address ke nama
host yang lebih mudah diingat atau sebaliknya. Packet yang digunakan untuk DNS adalah BIND atau BIND9, sebenarnya nggak terlalu beda dalam pengoperasianya, tapi kali ini saya menggunakan BIND9. Untuk instalasi BIND9 dapat
menggunakan perintah berikut.



debian:~# apt-get install bind9

Copy db.127 dan db.local
debian:~# cp /etc/bind/db.127 /etc/bind/db.192
debian:~# cp /etc/bind/db.local /etc/bind/db.kelompok6 -->nama folder

Edit file konfigurasi /etc/bind/db.192
debian:~# pico /etc/bind/db.192
$ TTL 604800
@ IN SOA kelompok6.com.root.kelompok6.com.(
11 ; Serial -->usahakan agar serial yang digunakan berbeda, agar tidak crash
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative cache TTL
;
@ IN NS kelompok6.com.
1.1.168 IN PTR kelompok6.com.

Edit file konfigurasi /etc/bind/db.kelompok6
debian:~# pico /etc/bind/db.kelompok6
$ TTL 604800
@ IN SOA kelompok6.com.root.kelompok6.com.(
12 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative cache TTL
;
@ IN NS kelompok6.com.
@ IN A 192.168.1.1
www IN A 192.168.1.1

Edit file konfigurasi /etc/bind/named.conf
debian:~# pico /etc/bind/named.conf

zone "kelompok6.com" {
type master;
file "/etc/bind/db.kelompok6";
};
zone "192.in-addr.arpa" {
type master;
file "/etc/bind/db.192";
};

Setting interface
debian:~# /etc/network/interfaces
address 192.168.1.1
netmask 255.255.255.0

Edit resolv.conf
debian:~# /etc/resolv.conf
tambahkan
nameserver 192.168.1.1

Restart BIND dengan perintah berikut
debian:~# /etc/init.d/networking restart
debian:~# /etc/init.d/bind9 restart

DNS siap digunakan, untuk mengecek apakah berhasil atau tidak, ketikan :
debian:~# nslookup kelompok6.com atau
debian:~# pico /etc/bind/db.192

silahkan mencoba ..^^

0 komentar: