Kamis, 23 Mei 2013

INSTALASI DNS DAN KONFIGURASI DEBIAN 6 TEXT


 DNS SERVER

·         Install Bind9
root@debian:~# apt-get install bind9

·         Setting file bind9
root@debian:~# nano /etc/bind/named.conf
zone “smkmuh2.sch.id”{
            type master:
            file “db.smk”;
};
zone “192.in-addr.arpa”{
            type master;
            file “db.192”;
};

kemudian tekan Ctrl +  O, enter (untuk menyimpan) dan tekan Ctrl + X (untuk keluar)
·         Setting file forward dari DNS

root@debian:~# cd /etc/bind
roloot@debian:~# cp db.local /var/cache/bind/db.smk
root@debian:~# nano /var/cache/bind/db.smk 

$TTL    604800
@          IN         A    smkmuh2.sch.id. root.smkmuh2.sch.id. (
                                                2                      ; Serial
                                      604800                      ; Refresh
                                        86400                      ; Retry
                                    2419200                      ; Expire
                                      604800                      ; Negative Cache TTL
;
@           IN         NS        smkmuh2.sch.id.
@           IN          A            192.168.9.1
www      IN          A            192.168.9.2
mail        IN          A            192.168.9.3

kemudian tekan Ctrl +  O, enter (untuk menyimpan) dan tekan Ctrl + X (untuk keluar)
root@debian:~# cp db.127 /var/cache/bind/db.192
root@debian:~# nano /var/cache/bind/db.192
$TTL    604800
@               IN         A          smkmuh2.sch.id.        root.smkmuh2.sch.id. (
                                                1                      ; Serial
                                      604800                      ; Refresh
                                        86400                      ; Retry
                                    2419200                      ; Expire
                                      604800                      ; Negative Cache TTL
;
@             IN         NS        smkmuh2.sch.id.
1.9.168    IN         PTR      smkmuh2.sch.id.
2.9.168   IN         PTR      www.smkmuh2.sch.id.
3.9.168  IN         PTR      mail.smkmuh2.sch.id.
           
kemudian tekan Ctrl +  O, enter (untuk menyimpan) dan tekan Ctrl + X (untuk keluar) lalu restart bind9 
root@debian:~# /etc/init.d/bind9 restart
root@debian:~# nslookup smkmuh2.sch.id
root@debian:~# nslookup 192.168.9.1
root@debian:~# nslookup www.smkmuh2.sch.id
root@debian:~# nslookup 192.168.9.2
root@debian:~# nslookup mail.smkmuh2.sch.id
root@debian:~# nslookup 192.168.9.3

Tidak ada komentar:

Posting Komentar