Konfigurasi DNS Server pada Debian 6 (Squeeze)
Konfigurasi DNS Server pada Debian 6 (Squeeze).
Tanpa basa-basi lagi, inilah langkah-langkahnya :
1. Install paket DNS Server dengan memasukan perintah
root@iqy:/home/iqy# apt-get install bind92. Masuk ke direktory Bind
root@iqy:/home/iqy# cd /etc/bind3. Lihat semua file/data yang ada di direktory Bind
root@iqy:/etc/bind# ls4. Lakukan konfigurasi denga memasukan perintah :
bind.keys db.empty named.conf.default-zones zones.rfc1918
db.0 db.local named.conf.local
db.127 db.root named.conf.options
db.255 named.conf rndc.key
root@iqy:/etc/bind# nano named.conf.default-zones
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
5. Ubah scriptnya dari :
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
Menjadi :
zone "iqy.com" { // DNS Name ServerSetelah selsai Ctrl + x lalu y & enter
type master;
file "db.iqy"; // Database untuk DNS Name Server
};
zone "192.in-addr.arpa" { // IP Address pertama
type master;
file "db.192"; // Database untuk IP Address
};
6. Salin db.127 & db.local dengan perintah :
root@iqy:/etc/bind# cp db.127 db.1927. Pindahkan hasil salinan ke direktory /var/cache/bind
root@iqy:/etc/bind# cp db.local db.iqy
root@iqy:/etc/bind# mv db.192 db.iqy /var/cache/bind8. Masuk ke direktory /var/cache/bind dan lihat hasilnya
root@iqy:/etc/bind# cd /var/cache/bind9. Lakukan pengeditan kedua database tersebut diatas
root@iqy:/var/cache/bind# ls
db.192 db.iqy
root@iqy:/var/cache/bind# nano db.192
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA localhost. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS localhost.
1.0.0 IN PTR localhost.
Ubah script menjadi :
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA iqy.com. root. iqy.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS iqy.com. // DNS Name Server
200.27.1 IN PTR iqy.com. // DNS Name Server
Ctrl + x lalu y & enter
root@iqy:/var/cache/bind# nano db.iqy ;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA localhost. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS localhost.
@ IN A 127.0.0.0
Ubah script menjadi :
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA iqy.com. root. iqy.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS iqy.com. // DNS Name Server
@ IN A 192.200.27.1 // IP Address
www IN A 192.200.27.1 // IP Address
Ctrl + x lalu y & enter
10. Lakukan Restart untuk Bind
root@iqy:/var/cache/bind# /etc/init.d/bind9 restart11. Install paket DNS Server yang lainnya
root@iqy:/var/cache/bind# apt-get install apache2 php512. Lihat apakah konfigurasi telah berhasil dengan perintah nslookup
root@iqy:/var/cache/bind# nslookup iqy.com
Server: 192.200.27.1
Address: 192.200.27.1#53
Name: iqy.com
Address: 192.200.27.1
Tidak ada komentar:
Posting Komentar