Ø root@ns /# vi /etc/named.zones
Isi filenya sebagai berikut :
/*
zone "ournetwork.net" in {
type master;
file "master/ournetwork.net";
};
*/
/*
zone "8.8.8.in-addr.arpa" in {
type master;
file "master/8.8.8.in-addr.arpa";
};
*/
zone "filxmuhamad.com" in {
type master;
file "master/filxmuhamad.com";
};
zone "10.168.192.in-addr.arpa" in {
type master;
file "master/10.168.192.in-addr.arpa";
};
Masuk file /var/named/master/
Ø root@ns /# cd /var/named/master
Ø root@ns /# cp localhost filxmuhamad.com
Ø root@ns /# vi filxmuhamad.com
Isi file tersebut ganti sebagai conto berikut :
$TTL 2w1d
@ IN SOA ns.filxmuhamad.com. root.filxmuhamad.com. (
1 ; serial
2H ; refresh
30M ; retry
2w1d ; expiry
1H ) ; minimum
IN NS ns. filxmuhamad.com.
IN MX 10 ns.filxmuhamad.com.
filxmuhamad.com. IN A 192.168.10.1
www IN CNAME ns
ftp IN CNAME ns
Ø root@ns /# cd /var/named/master
Ø root@ns /# cp filxmuhamad.com 10.168.192.in-addr.arpa
Ø root@ns /# vi 10.155.202.in-addr.arpa
Isi file tersebut ganti sebagai conto berikut :
$TTL 2w1d
@ IN SOA ns.filxmuhamad.com. root.filxmuhamad.com. (
1 ; serial
2H ; refresh
30M ; retry
2w1d ; expiry
1H ) ; minimum
IN NS ns.filxmuhamad.com.
IN MX 10 ns.filxmuhamad.com.
1 IN PTR ns.filxmuhamad.com.
Edit file di /etc/resolv.conf
Ø root@ns /# vi /etc/resolv.conf
*************************
domain filxmuhamad.com
nameserver 192.168.10.1
*************************
Setelah konfigurasi selesai, service named (Server DNS) harus di restart yakni;
Menggunakan perintah :
Ø root@ns /# service named restart
Stopping named: [ OK ]
Removing chroot jail: [ OK ]
Removing chroot jail: [ OK ]
Creating chroot jail for named: [ OK ]
Starting named: [ OK ]
Kemudian ketik perintah :
Ø root@ns /# chkconfig named on
Mengecek keberhasilan pembuatan Server DNS
Setelah melakukan konfigurasi dan menjalankan server DNS, sangat penting bagi kita untuk memastikan apakah Server DNS telah berjalan dengan baik, ada beberapa hal yang bisa kita lakukan :
Mengecek dengan menggunakan nslookup :
Ø root@ns /# nslookup filxmuhamad.com
Server: 192.168.10.1
Address: 192.168.10.1#53
Name: filxmuhamad.com
Address: 192.168.10.1
Melakukan test ping
Ø root@ns /# ping filxmuhamad.com
PING filxmuhamad.com (192.168.10.1) 56(84) bytes of data.
64 bytes from ns. filxmuhamad.com (192.168.10.1): icmp_seq=1 ttl=64 time=0.037 ms
64 bytes from ns. filxmuhamad.com (192.168.10.1): icmp_seq=2 ttl=64 time=0.059 ms
--- filxmuhamad.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.037/0.048/0.059/0.011 ms
Ø root@ns /# ping www.filxmuhamad.com
PING filxmuhamad.com (192.168.10.1) 56(84) bytes of data.
64 bytes from ns. filxmuhamad.com (192.168.10.1): icmp_seq=1 ttl=64 time=0.046 ms
64 bytes from ns. filxmuhamad.com (192.168.10.1): icmp_seq=2 ttl=64 time=0.057 ms
--- filxmuhamad.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.046/0.051/0.057/0.009 ms
Jika muncul pesan reply, maka kita sudah berhasil menginstall Server DNS.