Minggu, 12 Agustus 2012

Konfigurasi DNS Server di UBUNTU 11.10


 DNS Server merupakan server yand dapat digunakan untuk memberi layanan pemetaan nama host ke alamat IP dan bahkan sebaliknya dari alamat IP menjadi nama host. Paket server DNS ini cukup dipasang pada salah satu komputer yang berlaku sebagai   DNS server , sedangkan komputer yang lain berlaku sebagai DNS. DNS Server  adalah komponen yang berfungsi menerjemahkan nama domain dengan IP address atau sebaliknya. Dengan menggunakan  DNS Server , anda bisa memberikan alamat web dari web server dengan nama yang baik, contohnya www.ovizen.com

   Berikut Cara menyetting DNS server :

  1. apt-get install bind9

  2. $ apt-get install dnsuntils

  3. Edit /etc/bind/ named.conf.options : (tambahkan DNS IP ISP Anda)
    $ sudo pico /etc/bind/named.conf.options
directory “/var/cache/bind”;
// If there is a firewall between you and nameservers you want
// to talk to, you may need to fix the firewall to allow multiple
// ports to talk. See http://www.kb.cert.org/vuls/id/800113
// If your ISP provided one or more IP addresses for stable
// nameservers, you probably want to use them as forwarders.
// Uncomment the following block, and insert the addresses replacing
// the all-0′s placeholder.
// forwarders {
// 0.0.0.0;
// };
//

forwarders {
202.155.0.10;
202.155.0.15;
};

auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
};
  1. Primary Master untuk domain ovizen.com. Edit /etc/bind/named.conf.local:
    $ sudo pico /etc/bind/named.conf.local
//
// Do any local configuration here
//
// Consider adding the 1918 zones here, if they are not used in your
// organization
//include “/etc/bind/zones.rfc1918″;

    zone "ovizen.com" {
    type master;
    file "/etc/bind/db.latihan";
    allow-transfer { 172.16.30.27; };
    };

  1. Membuat file / etc / bind / db.lukman.com:
    # cp /etc/bind/db.local /etc/bind/db.dns
    { jika Anda telah membuat DNS sebelumnya, dan hanya ingin mengganti IP saja, abaikan perintah ini}

  2. pico /etc/bind/db.dns
    ubah konfigurasi yang ada, menjadi :

    ;
    ; BIND data file for local loopback interface
    ;
    $TTL 604800
      @        IN       SOA       ns.ovizen.com. root.ovizen.com. (
                                                               2 ; Serial

                                      604800 ; Refresh
                                        86400 ; Retry
                                    2419200 ; Expire
                                   604800 ) ; Negative Cache TTL
    ;
     @         IN        NS       ns.ovizen.com.
     @         IN         A        172.16.30.27
     ns        IN         A        172.16.30.27
    www      IN         A        172.16.30.27

  1. # cp /etc/bind/db.127 /etc/bind/db.rvdns
    { jika Anda telah membuat DNS sebelumnya, dan hanya ingin mengganti IP saja, abaikan perintah ini}

  2. pico /etc/bind/db.rvdns
    ubah konfigurasi menjadi :
    ;
    ; BIND reverse data file for local loopback interface
    ;
    $TTL 604800
       @         IN        SOA   ns.ovizen.com. root.ovizen.com. (
                                          1 ; Serial
                                 604800 ; Refresh
                                   86400 ; Retry
                               2419200 ; Expire
                              604800 ) ; Negative Cache TTL
    ;
       @        IN         NS     ns.ovizen.com.
      27        IN        PTR    ovizen.com.
     27  IN   PTR    www.ovizen.com
        # pico /etc/resolv.conf
        Ubah nameserver pertama dengan IP kita dan Tambahkan perintah berikut
        -search ovizen.com (nama DNS kita)
        -nameserver 172.16.30.27 (IP kita)

 10. Jika sudah keluar tampilannya, tambahkan
        Dengan perintah : search  ovizen.com
                                      nameserver 172.16.30.27
 11. Lakukan check kembali apakah DNS server sudah berjalan,
        Dengan perintah : named-checkconf -z
        Akan keluar kata-kata seperti ini.
        zone  ovizen .com /IN loaded serial 2012012201
        zone 30.16.172. in-addr.arpa/IN : loaded serial 2012012201
        zone 127.in-addr.arpa/IN : loaded serial 1
        zone 0.in-addr.arpa/IN : loaded serial 1
        zone 255.in-addr.arpa/IN : loaded serial 1
12. Restart BIND nya
        Dengan perintah : etc/init.d/bind9 restart
        Ditandai dengan * Stopping domain name service... bind9   [OK]

                                    * Starting domain name servive...  bind9   [OK]
13. Check DNS yang telah di konfigurasi tadi
        Dengan perintah : nslookup  ovizen.com 
        Ditandai dengan timbulnya : Server : 172.16.30.1
                                                       Address : 172.16.30.1#60
                                                     Name :  ovizen .com

                                                       Address : 172.16.30.1 17. 14. cek melalui google crome
www.ovizen.com


Tidak ada komentar:

Posting Komentar