1. Install pack DNS server terlebih dahulu.
root@server:# apt-get install bind9
2. Masuk ke direktori Bind.
root@server:# cd /etc/bind
3. Lihat semua file atau data yang ada di direktori bind.
root@server:/etc/bind# ls
bind.keys db.empty named.conf.default-zones zones.rfd1918
db.0 db.local named.conf.local
db.127 db.root named.conf.options
db.255 named.conf rndc.key
4. Lakukan konfigurasi dengan memasukkan perintah :
root@server:/etc/bind# nano named.conf.default-zones
// 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 "localhost" {
type master;
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
file "/etc/bind/db.local";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
file "db.hengky";
};
zone "192.in-addr.arpa" {
type master;
file "db.192";
};
;
$TTL 604800
@ IN SOA localhost. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
@ IN NS localhost.
1.0.0 IN PTR localhost.
;
$TTL 604800
@ IN SOA hengky.sch.id. root.hengky.sch.id. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
@ IN NS hengky.sch.id.
168.2.50 IN PTR hengky.sch.id.
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA localhost. root.localhost. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS localhost.
@ IN A 127.0.0.0
;
$TTL 604800
@ IN SOA hengky.sch.id. root.hengky.sch.id. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS hengky.sch.id.
@ IN A 192.168.2.50 <<< IP address
root@server:/etc/bind# nano /etc/resolv.conf
Masukkan :
domainserver hengky.sch.id
nameserver 192.168.2.50
search domain hengky.sch.id
Lalu Save.
11. Lakukan restart Bind
terdapat bacaan "It Works" maka konfigurasi DNS anda telah berhasil.