01 Juli 2011

Konfigurasi DNS Server di Linux O/S

Pada tutorial ini, saya akan membahas tentang DNS Server pada Sistem Operasi Linux (yang saya coba adalah Debian). Tutorial ini mungkin sudah lama saya buat, sekitar 4 tahun yang lalu, tapi jangan khawatir, karena apa yang akan saya sajikan disini masih dapat di aplikasikan pada Sistem Operasi Linux (Debian) yang baru. Langsung saja ... CeKiDot ... hehehe ... :)



Konfigurasi DNS Server - Bind9

Berikut ini adalah konfigurasi DNS Server menggunakan BIND9, 

Pertama install bind9 dengan Cara :
$ apt-get install bind9

Kemudian buat file untuk mendefinisikan domain, untuk membuat domain ikuti langkah berikut :
$ touch /etc/bind/192.168.1.rev
$ chmod 644 /etc/bind/192.168.1.rev
$ chown root.bind /etc/bind/192.168.1.rev
$ touch /etc/bind/idub.net.hosts
$ chmod 644 /etc/bind/idub.net.hosts
$ chown root.bind /etc/bind/idub.net.hosts

Setelah itu, edit file 192.168.1.rev dan idub.net.hosts seperti di bawah ini :

file di /etc/bind/192.168.1.rev
----------------------------------------------------------------------------------------------------------------------------
$ttl 38400
1.168.192.in-addr.arpa.    IN    SOA    ns1.idub.net. admin.idub.net. (
                    07102006
                    10800
                    3600
                    604800
                    38400 )
1.168.192.in-addr.arpa.    IN    NS    ns1. idub.net.
124.1.168.192.in-addr.arpa.    IN    PTR    ns1. idub.net
124.1.168.192.in-addr.arpa.    IN    PTR    server. idub.net
124.1.168.192.in-addr.arpa.    IN    PTR    www. idub.net 
----------------------------------------------------------------------------------------------------------------------------

file di /etc/bind/ idub.net.hosts----------------------------------------------------------------------------------------------------------------------------

$ttl 38400
idub.net.            IN    SOA    ns1. idub.net. admin.idub.net. (
                    07102006
                    10800
                    3600
                    604800
                    38400 )
idub.net.            IN    NS    ns1. idub.net.
server. idub.net.     IN    A    192.168.1.124
ns1. idub.net.        IN    A    192.168.1.124
www. idub.net.        IN    A    192.168.1.124
----------------------------------------------------------------------------------------------------------------------------

file di /etc/bind/named.conf.local
----------------------------------------------------------------------------------------------------------------------------
zone " idub.net " {

    type master;
    file “/etc/bind/ idub.net.hosts”; 
    };
zone “1.168.192.in-addr.arpa” {
    type master;
    file “/etc/bind/192.168.1.rev”;
    };
 ----------------------------------------------------------------------------------------------------------------------------

file di /etc/hosts
----------------------------------------------------------------------------------------------------------------------------
127.0.0.1    localhost 192.168.1.1    server. idub.net    server

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
----------------------------------------------------------------------------------------------------------------------------

file di /etc/host.conf
---------------------------------------------------------------------------
multi on
order hosts, bind ---------------------------------------------------------------------------

file di /etc/hostname---------------------------------------------------------------------------server---------------------------------------------------------------------------


file di /etc/resolv.conf

---------------------------------------------------------------------------
search idub.net
nameserver 192.168.1.124
---------------------------------------------------------------------------

SELESAI.........
Restart services Bind
$ /etc/init.d/bind restart
 

Test dengan perintah :
Nslookup
>www.idub.net
>192.168.1.124

0 komentar:

Posting Komentar

 
Design by Wordpress Theme | Bloggerized by Free Blogger Templates | coupon codes