Cara Install dan Konfigurasi DNS Server di Ubuntu Server 12.04

Cara Install dan Konfigurasi DNS Server di Ubuntu Server 12.04~sekarang kita akan membahas mengenai cara menginstal dan konfigurasi DNS server, tpi sebelum instal yang ini teman sebaiknya kalian install dulu Web Servernya !

- cara install DNS   
     (sudo apt-get install bind9)

- komfigurasi DNS
     IP Address yang saya gunakan 192.168.1.2 dengan nama domain ubuntu.lan
      $ sudo su
      # cd /etc/bind/
      # nano named.conf.local
 tamabahkan skrip berikut ;
     
      zone "ubuntu.lan" { type master;
      file "/etc/bind/db.ubuntu"; };
      zone "1.168.192.in-addr.arpa" { type master; notify no;
      file "/etc/bind/db.1";};
Penulisan IP pada baris zone "1.168.192.in-addr.arpa" ( ditulis terbalik.)
Copy file db.local
       
     # cp db.local db.ubuntu
     # cp db.local db.1
Edit db.ubuntu, scriptnya ;
    
;
; BIND data file for local loopback interface
;
$TTL    604800
@   IN  SOA ns.ubuntu.lan. root.ubuntu.lan. (
                  2     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
@   IN  NS  ubuntu.lan.
@   IN  A   192.168.1.1
ns  IN  A   192.168.1.1
www IN  CNAME   ubuntu.lan.
Edit db.1, scriptnya ;

;
; BIND data file for local loopback interface
;
$TTL    604800
@   IN  SOA ns.ubuntu.lan. root.ubuntu.lan. (
                  2     ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
@   IN  NS  ubuntu.lan.
1   IN  PTR ubuntu.lan.
ns  IN  PTR 192.168.1.1
www IN  PTR 192.168.1.1
Tambahkan DNS-nameserver pada konfigurasi interface
   # nano /etc/network/interfaces
   dns-nameservers 192.168.1.1
   dns-search ubuntu.lan
Configurasi DNS-Name server
dns client - ipv4 setting 
Pengujian ;
$ nslookup ubuntu.lan
nslookup ubuntu.lan
Server:     192.168.1.1
Address:    192.168.1.1#53
Name:   ubuntu.lan
Address: 192.168.1.1

$ dig ubuntu.lan
; <<>> DiG 9.8.1-P1 <<>> ubuntu.lan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58799
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;ubuntu.lan.            IN  A
;; ANSWER SECTION:
ubuntu.lan.     604800  IN  A   192.168.1.1
;; AUTHORITY SECTION:
ubuntu.lan.     604800  IN  NS  ubuntu.lan.
;; Query time: 6 msec
;; SERVER: 192.168.1.1#53(192.168.1.1)
;; WHEN: Sun Sep  9 08:00:55 2012
;; MSG SIZE  rcvd: 56

demikian semoga bermanfaat.!
source : http://hamsar88.blogspot.com/2013/01/cara-install-dan-konfigurasi-dns-server.html

0 comments:

Post a Comment