Oct 14, 2009

Konfigurasi Bind - DNS on Enterprise Linux 4

--prepare --

[root@RAC1 ~]# rpm - qa | grep bind
ypbind-1.17.2-13
bind-utils-9.2.4-24.EL4
bind-libs-9.2.4-24.EL4
bind-devel-9.2.4-24.EL4
bind-9.2.4-24.EL4
bind-chroot-9.2.4-24.EL4
[root@RAC1 ~]# rpm - qa | grep caching
caching-nameserver-7.3-3



--2--

for default installation, file placed under /var/named/chroot . edit file named.conf
[root@]#vim /var/named/chroot/etc/named.conf
or
/etc/named.conf


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


zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "named.local";
        allow-update { none; };
};


zone "sim-mob.com" IN {

        type master;

        file "/var/named/sim-mob.com";

};



zone "1.168.192.in-addr.arpa" IN {

        type master;

        file "/var/named/1.168.192.in-addr.zone";

};




zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
        type master;
        file "named.ip6.local";
        allow-update { none; };
};


--3--

create file under /var/named
[root@RAC1 ~]# vi /var/named/sim-mob.com


$TTL    86400
@               IN SOA  sim-mob.com.  root.sim-mob.com. (
                                        45              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum


@               IN NS           ns1.sim-mob.com.
@               IN MX           0 mail.sim-mob.com.
@               IN A            192.168.1.150
ns1             IN A            192.168.1.150
www             IN A            192.168.1.150
mail             IN A            192.168.1.150



[root@RAC1 ~]# vi /var/named/1.168.192.in-addr.zone
$TTL    86400
@               IN SOA  sim-mob.com.  root.sim-mob.com. (
                                        42              ; serial (d. adams)
                                        3H              ; refresh
                                        15M             ; retry
                                        1W              ; expiry
                                        1D )            ; minimum


@               IN NS           ns1.sim-mob.com.
1               IN PTR          mail.sim-mob.com.


--4--

another option in
[root@mail ~]# vi /etc/resolv.conf
nameserver 192.168.1.150


[root@mail ~]# vi /etc/host.conf
#order hosts,bind
order bind,hosts


--5--

 restart service
[root@mail ~]# /etc/init.d/named restart
( no error found )

--cecking n testing--

[root@mail ~]# dig sim-mob.com


; <<>> DiG 9.2.4 <<>> sim-mob.com
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 3370
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1


;; QUESTION SECTION:
;sim-mob.com.                   IN      A


;; ANSWER SECTION:
sim-mob.com.            86400   IN      A       192.168.1.150


;; AUTHORITY SECTION:
sim-mob.com.            86400   IN      NS      ns1.sim-mob.com.


;; ADDITIONAL SECTION:
ns1.sim-mob.com.        86400   IN      A       192.168.1.150


;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Wed Oct 14 16:31:08 2009
;; MSG SIZE  rcvd: 79


and


[root@mail ~]# nslookup sim-mob.com
Server:         127.0.0.1
Address:        127.0.0.1#53


Name:   sim-mob.com
Address: 192.168.1.150

sumber : google.com

0 comments:

Post a Comment

comment please ...