Rabu, 09 Juni 2010

DNS SERVER

  • Install paket dulu

# yum install bind bind-libs bind-utils bind-chroot


  • Edit konfigurasinya

# vim /var/named/chroot/etc/named.conf


  • Isi file /var/named/chroot/var/named/zone/linuxer.local.zone:

$ttl 38400
@ IN SOA ns.linuxer.local. root.linuxer.local (
1196006770
10800
3600
604800
38400 )
IN NS fxekobudi.linuxer.local.
IN MX 20 mail.linuxer.local.
fxekobudi IN A 192.168.0.44
www IN CNAME fxekobudi
ftp IN CNAME fxekobudi


  • Isi file /var/named/chroot/var/named/zone/0.168.192.in-addr.arpa.zone:

$ttl 38400
@ IN SOA ns.linuxer.local. root.linuxer.local (
1196006769
10800
3600
604800
38400 )
IN NS fxekobudi.linuxer.local.
44 IN PTR fxekobudi.linuxer.local.


  • Konfigurasi untuk file /var/named/chroot/etc/named.primary.conf:
    # vim /var/named/chroot/etc/named.primary.conf

  • zone “fxekobudi.local” IN {
    type master;
    file “./zone/fxekobudi.local.zone”;
    allow-update { key “rndckey”; };
    allow-transfer { 192.168.0/26; };
    };

zone “sarolangun.local” IN {
type master;
file “./zone/sarolangun.local.zone”;
allow-update { key “rndckey”; };
allow-transfer { 192.168.0/26; };
};


  • Isi file /var/named/chroot/var/named/zone/fxekobudi.local.zone:

  • $ttl 38400
    @ IN SOA ns.linuxer.local. root.linuxer.local (
    1196006770
    10800
    3600
    604800
    38400 )
    IN NS fxekobudi.fxekobudi.local.
    IN MX 20 mail.fxekobudi.local.
    fxekobudi IN A 192.168.0.44
    www IN CNAME fxekobudi
    ftp IN CNAME fxekobudi


  • Isi file /var/named/chroot/var/named/zone/sarolangun.local.zone:


$ttl 38400
@ IN SOA ns.linuxer.local. root.linuxer.local (
1196006770
10800
3600
604800
38400 )
IN NS fxekobudi.sarolangun.local.
IN MX 20 mail.sarolangun.local.
fxekobudi IN A 192.168.0.44
www IN CNAME fxekobudi
ftp IN CNAME fxekobudi


  • Konfigurasi untuk file /etc/resolv.conf:

  • search linuxer.local
    search fxekobudi.local
    search sarolangun.local
    nameserver 127.0.0.1
    nameserver 192.168.0.44


  • Tes konfigurasi DNS server:


$ dig linuxer.local
$ nslookup www.linuxer.local








Tidak ada komentar:

Posting Komentar