Langkah-langkah Membuat DNS Multiple HOST

1. Edit hostname
debianserver:/etc/bind# vim /etc/hostname
debianserver
esc:wq

2. Edit hosts
#vim /etc/hosts

127.0.0.1 localhost.localdomain localhost debianserver ns

#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

3. Edit named.conf.local
//
// Do any local configuration here
//

zone “imron.com” IN {
type master;
file “/etc/bind/db.imron”;
allow-query {any;};
};

zone “2.168.192.in-addr.arpa” IN {
type master;
file “/etc/bind/rev.imron”;
};

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include “/etc/bind/zones.rfc1918″;

4. Edit db.imron
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA imron.com. root.imron.com. (
336 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS imron.com.
IN MX 10 imron.com.

dns IN A 192.168.2.15
ftp IN A 192.168.2.16
mail IN A 192.168.2.17

5. Edit rev.imron
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA imron.com. root.imron.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
IN NS imron.com.

15 IN PTR imron.com.
15 IN PTR serverdebian.
16 IN PTR ftp.imron.com.
17 IN PTR mail.imron.com.

6. Edit resolv.conf
#/bin/bash: indent: command not found
search .
domain imron.com
nameserver localhost
nameserver 192.168.2.15

7. Restrat DNS
debianserver:/etc/bind# /etc/init.d/bind9 restart
Stopping domain name service…: bind.
Starting domain name service…: bind.
debianserver:/etc/bind#

8. Pengujian

Menggunakan nslookup
debianserver:/etc/bind# nslookup
> localhost
Server: 192.168.2.15
Address: 192.168.2.15#53

Name: localhost
Address: 127.0.0.1
> 127.0.0.1
Server: 192.168.2.15
Address: 192.168.2.15#53

1.0.0.127.in-addr.arpa name = localhost.
> ftp
Server: 192.168.2.15
Address: 192.168.2.15#53

Name: ftp.imron.com
Address: 192.168.2.16
> mail
Server: 192.168.2.15
Address: 192.168.2.15#53

Name: mail.imron.com
Address: 192.168.2.17
> 192.168.2.17
Server: 192.168.2.15
Address: 192.168.2.15#53

17.2.168.192.in-addr.arpa name = mail.imron.com.
>

Menggunakan ping
> debianserver:/etc/bind# ping ftp.imron.com
PING ftp.imron.com (192.168.2.16) 56(84) bytes of data.

— ftp.imron.com ping statistics —
3 packets transmitted, 0 received, 100% packet loss, time 2010ms

debianserver:/etc/bind# ping mail.imron.com
PING mail.imron.com (192.168.2.17) 56(84) bytes of data.

— mail.imron.com ping statistics —
3 packets transmitted, 0 received, 100% packet loss, time 1999ms

debianserver:/etc/bind#

(di kutip dari smkn1-tuban.sch.id)