Sabtu, 17 Mei 2014

Konfigurasi DNS server dengan ubuntu

1. install bind9
    sudo apt-get install bind9

2. masuk direktori bind
    cd /etc/bind

    cek direktori bind
    ls

3. copy db.local
    cp db.local db.isgi (nama tererah)
    nano db.isgi

    isikan

    ;
; BIND data file for local loopback interface
;
$TTL    604800
@    IN    SOA    isgi.edu. ns1.isgi.edu. (
                  2        ; Serial
             604800        ; Refresh
              86400        ; Retry
            2419200        ; Expire
             604800 )    ; Negative Cache TTL
;
@         IN    NS    isgi.edu.
@         IN    A    127.0.0.1
            IN    A    192.168.10.1 ;(alamat ip komputer anda )
@         IN    AAAA    ::1

ns1IN        A    192.168.10.1  ;(alamat ip komputer anda )

www    IN    CNAME    ns1
ftp        IN    CNAME    ns1
smtp     IN    CNAME    ns1

4. Copy db.isgi
    cp db.isgi db.ipresolver
    nano db.ipresolver 

    isikan
;
; BIND data file for local loopback interface
;
$TTL    604800
@    IN    SOA    isgi.edu. ns1.isgi.edu. (
                  2        ; Serial
             604800        ; Refresh
              86400        ; Retry
            2419200        ; Expire
             604800 )    ; Negative Cache TTL
;
@    IN    NS    isgi.edu.
1    IN    PTR    isgi.edu.

5.  konfigurasi named.conf
     nano named.conf

    isikan

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "isgi.edu" {
type master;
file "/etc/bind/db.isgi";
};
//ipnya di balik
zone "10.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.ipresolver";
};
include "/etc/bind/named.conf.local";


6. konfigurasi DNS clien
    cd /etc
    nano resolv.conf

    isikan
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
search isgi.edu
nameserver 192.168.10.1 (ip komputer anda)

7. restart bind
    /etc/init.d/bind9 restart


8. cek dengan
    dig -x isgi.edu
    jika nilai tidak 0 berati berhasil
    ping www.isgi.edu    jika tidak unreachable berarti berhasil

   









Tidak ada komentar:

Posting Komentar