Blog

Home   /   blog   /   DNS Server di Ubuntu 11.04

DNS Server di Ubuntu 11.04

Ketentuan:

Nama DNS Server            : ns1.edusoftcenter.com

Nama Web Server           : www.edusoftcenter.com

IP Address                          : 192.168.1.1

 Instalasi:

   # apt-get install bind9

 

Setting Cache Server:

# vim /etc/bind/named.conf.options

hilangkan tanda komentar ( // ) dan ganti angka 1.2.3.4 dengan alamat server DNS yang diberikan oleh ISP langganan Anda (pada contoh ini IP DNS adalah 8.8.8.8, milik Google).

forwarders {
8.8.8.8;
};

 

Membuat File Zone:

                 # vim /etc/bind/named.conf.local

     zone “edusoftcenter.com” {
                type master;
                file “/etc/bind/db.edusoft”;
     };
   # cp /etc/bind/db.local /etc/bind/db.edusoft
   # vim /etc/bind/db.edusoft
   ; Zone file for edusoftcenter.com
     $TTL  604800                             ; 2 hours
     @          IN   SOA     ns1.edusoftcenter.com. webmaster.edusoftcenter.com. (
                              2          ; Serial
                         604800          ; Refresh
                          86400          ; Retry
                        2419200          ; Expire
                         604800 )        ; Negative Cache TTL
     ;
                 NS     ns1.edusoftcenter.com.

     @                 A     192.168.1.1
     www               A     192.168.1.1

 


Membuat File Reverse Zone:

# vim /etc/bind/named.conf.local

    zone “1.168.192.in-addr.arpa” {
                type master;
                file “/etc/bind/db.192”;
     };

    # cp /etc/bind/db.127 /etc/bind/db.192

# vim /etc/bind/db.192

    ; Zone file for reverse
     $TTL  604800                            ; 2 hours
     @          IN  SOA     ns1.edusoftcenter.com. webmaster.edusoftcenter.com. (
                             2          ; Serial
                        604800          ; Refresh
                         86400          ; Retry
                       2419200          ; Expire
                        604800          ; Negative Cache TTL
     ;
     @          IN    NS    ns1.
     1         IN    PTR   ns1.edusoftcenter.com.
     1         IN    PTR   www.edusoftcenter.com.

 

# vim /etc/resolv.conf

search edusoftcenter.com

nameserver 192.168.1.1

  # /etc/init.d/bind9 restart

 

Lakukan Pengujian:

 # ping www.edusoftcenter.com

Leave a Reply

Your email address will not be published.