konfigurasi debian 6 squeeze (linux)

Konfigurasi DNS Server di Debian 6 Squeeze
 images
 
Konfigurasi DNS Server pada Debian 6 Squeeze – DNS Server atau Domain Name System Server adalah sebuah teknik atau sistem di dunia Teknologi Informatika yang memungkinkan sebuah alamat IP dapat diakses dengan nama host. Misalnya adalah alamat IP 74.125.135.132 diubah menjadi sebuah nama host, yaitu gratisanterbaik.blogspot.com.
Fungsi DNS ini sangatlah penting untuk internet, karena dengan adanya Domain Name System ini, kita dimudahkan dengan banyak hal. Salah satunya adalah kemudahan menghafal sebuah nama host daripada sebuah alamat IP.
Install vim :
#apt-get install vim
Jika sudah, mulailah setting DNS Server :
1. Install pack DNS server terlebih dahulu.
 root@eryvj:# apt-get install bind9
2. Masuk ke direktori Bind.
root@eryvj:# cd /etc/bind
3. Lihat semua file atau data yang ada di direktori bind.
root@eryvj:/etc/bind# ls
bind.keys      db.empty        named.conf.default-zones     zones.rfd1918
     db.0              db.local           named.conf.local
     db.127          db.root            named.conf.options
     db.255          named.conf     rndc.key
4. Lakukan konfigurasi dengan memasukkan perintah :
root@eryvj:/etc/bind# vim 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″;
};

 
   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 “smkpraskab.sch.id” {
           type master;
file “db.smk”;
};

zone “192.in-addr.arpa” {
type master;
file “db.192″;
};
 
   Lalu save dengan “Ctrl+x” “:y” dan “Enter”.
 
5. Copy/salin db.127 dan db.local dengan perintah :
    root@eryvj:/etc/bind# cp db.127 db.192
    root@eryvj:/etc/bind# cp db.local db.smk
6. Pindahkan hasil salinan tersebut ke direktori /var/chache/bind dengan memasukkan perintah :
    root@eryvj:/etc/bind# mv db.192 db.smk /var/chache/bind
7. Masuk ke direktori /var/cache/bind dan lihat hasilnya.
    root@eryvj:/etc/bind# cd /var/cache/bind
    root@eryvj:/var/cache/bind# ls
    db.192    db.smk
 
8. Edit file db.192
    root@eryvj:/var/cache/bind# vim 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 diatas menjadi :
               ;
           ; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     smkpraskab.sch.id. root.smkpraskab.sch.id (
1         ; Serial
604800         ; Refresh
86400         ; Retry
2419200         ; Expire

                         604800 )       ; Negative Cache TTL
           ;
@                 IN      NS     smkpraskab.sch.id.
168.2.50    IN      PTR   smkpraskab.sch.id.

    Lalu save dengan “Ctrl+C” “:w” dan “Enter”.

9. Edit file db.sandi
    root@eryvj:/var/cache/bind# vim db.smk
 
           ;
               ; 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 diatas menjadi :
               ;
               ; BIND data file for local loopback interface
;
$TTL    604800            
@       IN      SOA    smkpraskab.sch.id. root.smkpraskab.sch.id. (
2         ; Serial
604800         ; Refresh
86400         ; Retry
2419200         ; Expire
604800 )       ; Negative Cache TTL
;
@               IN      NS      gratisanterbaik.com.
@               IN      A        192.168.2.50                                              <<< IP address
              www           IN      A        192.168.2.50                                              <<< IP address
 
       Lalu save dengan “Ctrl+C” “:w” dan “Enter”.
 
10. Masuk ke resolv.conf
root@eryvj:/var/cache/bind# vim /etc/resolv.conf Masukkan :

      domainserver gratisanterbaik.com
      nameserver 192.168.2.50
      search domain smkpraskab.sch.id

      Lalu Save.
11. Lakukan restart Bind
      root@eryvj:/var/cache/bind# /etc/init.d/bind9 restart
 
12. Install pack DNS Server yang lainnya.
      root@gratisanterbaik:/var/cache/bind# apt-get install apache2 php5
 
13. Cek konfigurasi apakah sudah berhasil atau belum.
      root@eryvj:/var/cache/bind# nslookup gratisanterbaik.com
      Server:       192.168.2.50
      Address:     192.168.2.50#53
 
      Name:         smkpraskab.sch.id
      Address:     192.168.2.50
 
14. Jika sudah seperti diatas, maka konfigurasi DNS berhasil.
15. Untuk memastikan cek di web browser dan masukkan domain smkpraskab.sch.id , jika
terdapat bacaan “It Works” maka konfigurasi DNS anda telah berhasil.
jika tidak check nano /etc/network/interfaces dan
nano /etc/resolv.conf
Share on Google Plus

About eri marzoni

This is a short description in the author block about the author. You edit it by entering text in the "Biographical Info" field in the user admin panel.

0 komentar :

Posting Komentar