1. Jalankan Terminal dan masuk root dengan perintah
$ su -
2. cek paket Bind :
# rpm -qa | grep bind
3. konfigurasi interface dengan ip private :
isikan ip, netmask dan hwaddr(hwaddr bisa diketahui dengan comand ifconfig di Terminal)
# nano /etc/sysconfig/network-script/ifcfg-eth0
4. konfigurasi hosts :
beri tanda pagar(#) di depan ip localhost, lalu tambahkan ip private dan nameserver terserah anda
# nano /etc/hosts
5. konfigurasi resolv.conf agar name server bisa di cari :
# nano /etc/resolv.conf
6. lanjut ke konfigurasi name server :
# gedit /etc/named.conf
// named.caching-nameserver.conf
//
// Provided by Red Hat caching-nameserver package to configure the
// ISC BIND named(8) DNS server as a caching only nameserver
// (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//
// DO NOT EDIT THIS FILE - use system-config-bind or an editor
// to create named.conf - edits to this file will be lost on
// caching-nameserver package upgrade.
//
options {
#listen-on port 53 { 127.0.0.1; };
#listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; 192.168.7.0/24; };
recursion yes;
allow-transfer { localhost; 192.168.7.0/24; };
allow-recursion { localhost; 192.168.7.0/24; };
};
controls { inet 127.0.0.1 allow { localhost; } keys {rndckey;};
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
view "internal" {
match-clients {
localhost;
192.168.7.0/24;
};
zone "." IN {
type hint;
file "named.ca";
};
//name server
zone "m_bainurahman.com" IN {
type master;
file "m_bainurahman.com.db";
allow-update { none; };
};
//reverse
zone "7.168.192.in-addr.arpa" IN {
type master;
file "192.db";
allow-update { none; };
};
//copian /etc/named.rfc
zone "localhost.localdomain" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "named.localhost";
allow-update { none; };
};
zone "1.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.loopback";
allow-update { none; };
};
zone "1.0.0.127.in-addr.arpa" IN {
type master;
file "named.loopback";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "named.empty";
allow-update { none; };
};
};
#include "/etc/named.rfc1912.zones";
include "/etc/rndc.key";
7. konfigurasi dari name server :
# nano /var/named/chroot/var/named/m_bainurahman.com.db
$TTL 86400
@ IN SOA inu.m_bainurahman.com. root.inu.m_bainurahman.com. (
02041991 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTl
)
IN NS inu.m_bainurahman.com.
IN A 192.168.7.2
IN MX 20 inu.m_bainurahman.com.
oscar IN A 191.168.7.2
8. konfigurasi reverse domain :
# nano /var/named/chroot/var/named/192.db
$TTL 86400
@ IN SOA inu.m_bainurahman. root.inu.m_baniurahman.com. (
02041991 ;Serial
3600 ;Refresh
1800 ;Retry
604800 ;Expire
86400 ;Minimum TTL
)
@ IN NS inu.m_bainurahman.com.
1 IN PTR inu.m_bainurahman.com.
9. terakir tinggal restart named
# service named restart
10. sekarang waktunya mengetes domain yang qt buat yaitu dengan perintah :
# nslookup m_bainurahman.com
Tidak ada komentar:
Posting Komentar