Ini merupakan alternatif dalam konfigurasi DNS pada Cent OS
1. Berdoa, hehehe
2. Intall Paket
[root@kuningan ~]# yum install bind bind-chroot bind-libs bind-utils caching-nameserver
3. Konfigurasi RNDC
[root@kuningan ~]# cd /var/named/chroot/etc/
[root@kuningan etc]# rndc-confgen > rndc.key
[root@kuningan etc]# chown root:named rndc.key
Edit rndc.key seperti ini:
[root@kuningan etc]# vim rndc.key
# Start of rndc.conf
key "rndckey" {
algorithm hmac-md5;
secret "HegIBd7PDqY5mQYzCe5L0w==";
};
4. Konfigure named.conf
[root@kuningan etc]# vim /var/named/chroot/etc/named.conf
Konfigurasi named.conf seperti dibawah:
//sertakan isi file rndc.key
key "rndckey" {
algorithm hmac-md5;
secret "HegIBd7PDqY5mQYzCe5L0w==";
};
//dns server adalah 10.200.16.11 dimana akan //memberikan kontrol kepada alamat jaringan yang //menggunakan dns
controls {
inet 127.0.0.1 allow { 127.0.0.1; } keys { "rndckey"; };
inet 10.200.16.11 allow { 10.200.16.0/25; } keys { "rndckey"; };
inet 10.200.16.11 allow { 10.200.15.128/25; } keys { "rndckey"; };
};
options {
directory "/var/named";
pid-file "/var/run/named/named.pid";
recursion yes;
allow-recursion {
127.0.0.1;
10.200.16.0/25;
10.200.15.128/25;
};
forwarders {
202.51.96.5;
202.51.96.10;
};
listen-on {
127.0.0.1;
10.200.16.11;
};
query-source address * port 53;
// so people can't try to guess what version you're running
version "REFUSED";
allow-query {
127.0.0.1;
10.200.16.0/25;
10.200.15.128/25;
};
};
server 10.200.16.11 {
keys { rndckey; };
};
zone "." IN {
type hint;
file "named.ca";
};
zone "nockplace.net" IN {
type master;
file "nockplace.net.db";
};
5. Membuat zona
[root@kuningan etc]# vim /var/named/chroot/var/named/
nockplace.net.db
Isinya adalah seperti berikut :
$ttl 38400
nockplace.net. IN SOA ns.nockplace.net. admin.nockplace.net. (
2007020400 ; Serial
10800 ; Refresh after 3 hours
3600 ; Retry after 1 hour
604800 ; Expire after 1 week
86400 ) ; Minimum TTL of 1 day
nockplace.net. IN NS ns.nockplace.net.
nockplace.net. IN MX 1 mx.nockplace.net.
nockplace.net. IN MX 5 mx2.nockplace.net.
www.nockplace.net. IN A 10.200.16.11
ns.nockplace.net. IN A 10.200.16.11
cacti.nockplace.net. IN A 10.200.16.11
mrtg.nockplace.net. IN A 10.200.16.17
mx.nockplace.net. IN A 10.200.16.11
mx2.nockplace.net. IN A 10.200.16.11
mail.nockplace.net. IN CNAME mx.nockplace.net.
6. Mengubah resolv.conf
[root@kuningan etc]# vim /etc/resolv.conf
Ubah nameserver menjadi :
nameserver 127.0.0.1
[root@kuningan etc]# service network restart
7. Menjalankan Service DNS
[root@kuningan etc]# service named start
[root@kuningan etc]# chkconfig named on
8. Query
[root@kuningan etc]# nslookup www.nockplace.net
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: www.nockplace.net
Address: 10.200.16.17
9. Pengaturan Document Root
[root@kuningan etc]# vim /etc/httpd/conf/httpd.conf
Tambahkan:
DocumentRoot /var/www/html/mrtg-mon
ServerName mrtg.nockplace.net
10. Troubleshooting
Untuk menghilangkan firewall:
[root@kuningan etc]# iptables -F
Semoga membantu....
Alternatif konfigurasi DNS Cent OS
Label:
Know it,
Kuliah,
Operating System
Langganan:
Posting Komentar (Atom)
0 komentar:
Posting Komentar
Jadilah pengunjung yang aktif, komentar anda sangat berarti.