Instalasi BInd – Membuat secondary server (backup)

Setelah NS1 berjalan seperti tulisan sebelumnya kita akan coba membuat dengan NS2, NS2 disini berperan sebagai backup apabila terjadi masalah pada NS1.

Setting dibawah ini akan berjalan setelah tulisan pertama bisa berjalan…

NS1 dgn IP 192.168.0.1
NS2 dgn IP 192.168.0.2
dengan domain rhesamahendra.com

kita akan langsung coba setting NS2

1. Lihat paket Bind

[root@rhesa2 ~]# rpm -qa bind*
bind-libs-9.2.4-2
bind-utils-9.2.4-2
bind-9.2.4-2

2. Setting file /etc/resolv.conf

[root@rhesa2 ~]# nano /etc/resolv.conf
nameserver 192.168.0.1

3. Setting file /etc/named.conf

[root@rhesa2 ~]# nano /etc/named.conf
//
// named.conf for Red Hat caching-nameserver
//

options {
directory “/var/named”;
dump-file “/var/named/data/cache_dump.db”;
statistics-file “/var/named/data/named_stats.txt”;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
allow-transfer {208.99.198.184/32;};
};

//
// a caching only nameserver config
//
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};

zone “localhost” IN {
type master;
file “localhost.zone”;
allow-update { none; };
};

zone “rhesamahendra.com” IN {
type slave;
file “/var/named/rhesamahendra.com.zone”;
// allow-update { none; };
allow-transfer { 192.168.0.1/32; };
masters { 192.168.0.1; };
};

zone “0.168.192.in-addr.arpa” IN {
type slave;
file “/var/named/0.168.192.rev”;
// allow-update { none; };
allow-transfer { 192.168.0.1/32; };
masters { 192.168.0.1; };

};

include “/etc/rndc.key”;

4. Setelah itu rubah permission pada file /var/named

[root@rhesa2 ~]# chmod 777 -Rvf /var/named/
mode of `/var/named/’ changed to 0777 (rwxrwxrwx)
mode of `/var/named/named.zero’ changed to 0777 (rwxrwxrwx)
mode of `/var/named/localhost.zone’ changed to 0777 (rwxrwxrwx)
mode of `/var/named/data’ changed to 0777 (rwxrwxrwx)
mode of `/var/named/named.local’ changed to 0777 (rwxrwxrwx)
mode of `/var/named/named.ca’ changed to 0777 (rwxrwxrwx)
mode of `/var/named/named.ip6.local’ changed to 0777 (rwxrwxrwx)
mode of `/var/named/localdomain.zone’ changed to 0777 (rwxrwxrwx)
mode of `/var/named/named.broadcast’ changed to 0777 (rwxrwxrwx)
mode of `/var/named/slaves’ changed to 0777 (rwxrwxrwx)

5. File /var/named/rhesamahendra.com dan /var/named/0.168.192.rev akan otomatis tercopy ke NS2, jadi tidak perlu lagi setting file /var/named hanya cukup rubah permission nya saja.

6. Jalankan service named

[root@rhesa2 ~]# service named restart
Stopping named: [ OK ]
Starting named: [ OK ]

7. Kemudian cek di file log nya sebenernya apa yang dikerjakan???

[root@rhesa2 ~]# tail /var/log/messages
Aug 3 04:25:42 rhesa2 named[9362]: listening on IPv4 interface venet0:0, 192.168.0.2#53
Aug 3 04:25:42 rhesa2 named[9362]: command channel listening on 127.0.0.1#953
Aug 3 04:25:42 rhesa2 named[9362]: zone localhost/IN: loaded serial 42
Aug 3 04:25:42 rhesa2 named[9362]: running
Aug 3 04:25:42 rhesa2 named[9362]: zone rhesamahendra.com/IN: transferred serial 100
Aug 3 04:25:42 rhesa2 named[9362]: transfer of ‘rhesamahendra.com/IN’ from 192.168.0.1#53: end of transfer
Aug 3 04:25:42 rhesa2 named[9362]: zone rhesamahendra.com/IN: sending notifies (serial 100)
Aug 3 04:25:43 rhesa2 named[9362]: zone 0.168.192.in-addr.arpa/IN: transferred serial 100
Aug 3 04:25:43 rhesa2 named[9362]: transfer of ‘0.168.192.in-addr.arpa/IN’ from 192.168.0.1#53: end of transfer
Aug 3 04:25:43 rhesa2 named[9362]: zone 0.168.192.in-addr.arpa/IN: sending notifies (serial 100)

terlihat ada file yang ditransfer pada log diatas, disitu dikatakan bahwa transfer of ……….
sebenarnya file tersebut di copy sehingga apabila NS1 dimatikan NS2 masih mempunyai backup konfigurasi (salinan)

8. Hasil menggunakan nslookup

[root@rhesa2 ~]# nslookup rhesamahendra.com
Server: 192.168.0.1
Address: 192.168.0.1#53

Name: rhesamahendra.com
Address: 192.168.0.1

jawaban diatas masih memanggil server dari NS1 dgn IP 192.168.0.1

bagaimana kalau terjadi masalah di NS1, sekarang kita akan coba matikan NS1,
apakah nslookup masih bisa berjalan???

9. Sebelumnya tambahkan nameserver 192.168.0.2

[root@rhesa2 ~]# cat /etc/resolv.conf
nameserver 192.168.0.1
nameserver 192.168.0.2

disini domain akan memanggil NS2 karena NS1 sudah dimatikan lalu bagaimana dengan setting
file /etc/named dll??
setelah service dijalankan semua file di NS1 akan tercopy ke Ns2 sehingga konfigurasi akan
diambil dari file copy tadi.

10. Sekarang kita lihat hasil setelah NS1 dimatikan. Perhatikan adress dan server

[root@rhesa2 ~]# nslookup rhesamahendra.com
Server: 192.168.0.2
Address: 192.168.0.2#53

Name: rhesamahendra.com
Address: 192.168.0.1

diatas dapat dilihat bahwa server dan adress adalah 192.168.0.2
berarti apabila ada masalah pada NS1 DNS akan tetap bisa berjalan..

4 Responses to “Instalasi BInd – Membuat secondary server (backup)”


  1. 2 rhesarhein August 19, 2008 at 3:10 pm

    thanks AK ikut coba aja…

  2. 3 br0t0wali April 26, 2010 at 2:02 pm

    boss… itu konfigurasi untuk 2 pc apa 1 pc…


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Follow me

August 2008
M T W T F S S
« Jul   Sep »
 123
45678910
11121314151617
18192021222324
25262728293031

Status

Kirim Pesan YM