Selasa, 24 Agustus 2010

Setting DNS server


Install bind9 dengan perintah
# apt-get install bind9
masukkan cd sesuai yang diminta
Masuk pada direktori /etc/bind9,
Setelah itu, kita copy file db.127, file db.local, dan file named.conf Dengan cara sebagai berikut :
# cp db.127 db.192
# cp db.local db.angga
# cp named.conf named.conf.backup
Edit file nano db.192 seperti konfigurasi dibawah ini:

;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA angga.net. root. angga.net.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS angga.net.
1.17.168 IN PTR angga.net.
www IN PTR angga.net.

Edit file pico named.conf seperti konfigurasi dibawah ini yang bercetak tebal :
// 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”;

// 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 ” angga.net ” {
type master;
file “/etc/bind/db. angga″;
};

zone “192.in-addr.arpa” {
type master;
file “/etc/bind/db.192″;
};

zone “0.in-addr.arpa” {
type master;
file “/etc/bind/db.0″;
};

Edit file nano db. angga seperti konfigurasi dibawah ini :

;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA angga.net. root. angga.net. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS angga.net.
@ IN A 192.168.1.2
www IN A 192.168.1.2

Restart bind9,
/etc/init.d/bind9 restart

Ping www.angga.net apabila reply, DNS sudah berhasil

Tidak ada komentar:

Posting Komentar

Search Box