Minggu, 01 Juni 2014

CARa KONFIGURASI DNS Server

1. Setting ip addr
2. cek ifconfig
3. Masuk ke terminal sebagai root
sudo su -
masukkan password

4. Instalasi DNS
apt-get install bind9

5. Konfigurasi DNS
masuk ke folder bind
cd /etc/bind
ls
cari file db.local dan named.conf
cp db.local db.labjarkom
nano db.labjarkom
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA labjarkom.edu. ns1.labjarkom.edu. (
2 ; Serial
604800; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS labjarkom.edu.
@ IN A 127.0.0.1
IN A 192.168.31.1 ; alamat IP komputer anda
@ IN AAAA ::1
ns1IN A 192.168.31.1 ; alamat IP komputer anda
www IN CNAME ns1
ftp IN CNAME ns1
smtp IN CNAME ns1

6. Konfigurasi Pengarah
cp db.labjarkom db.ipresolver
nano db.ipresolver
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA labjarkom.edu. ns1.labjarkom.edu. (
2 ; Serial
604800 ; Refresh
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS labjarkom.edu. ; (perhatikan) diakhiri dengan titik
1 IN PTR labjarkom.edu.

7. Konfigurasi named.conf
cp named.conf named.conf.asli
nano named.conf
// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local
include "/etc/bind/named.conf.options";
// prime the server with knowledge of the root servers
zone "." {
type hint;
file "/etc/bind/db.root";
};
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "labjarkom.edu" {
type master;
file "/etc/bind/db.labjarkom";
};
//ipnya di balik
zone "31.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.ipresolver";
};
include "/etc/bind/named.conf.local";

8. Konfigurasi DNS client
cd /etc
nano resolv.conf
# Generated by NetworkManager
# IP addr komputer server anda misal
search labjarkom.edu
nameserver 192.168.31.1

9. Restart bind
/etc/init.d/bind9 restart

10. Pengujian / cek domain
dig -x labjarkom.edu
jika nilai tidak 0 berati berhasil
ping www.labjarkom.edu
jika tidak unreachable berarti berhasil

11. Cek dengan browser
address diisi dengan www.labjarkom.edu

Tidak ada komentar:

Posting Komentar