Cara Membuat DNS Server di Fedora 14 ( atau Linux yg Berbasis Redhat Lainnya ) Menggunakan Bind - Berikut Tutorialnya yg Saya Dpt dari Escendol, Cekidot.
Misalkan IP Server 192.168.11.11
Example name server ns1.hendraz.tk
Langsung aja boss
1.Install Bind
- yum install bind
2.Masuk ke direktori named.conf karena konfigurasi akan tersimpan disini
- vi /etc/named.conf
- Ubah Line 11
listen-on port 53 { 127.0.0.1; }; menjadi listen-on port 53 { 192.168.11.11; };
- Ubah Line 17
allow-query { localhost; }; menjadi allow-query { 192.168.11.0/24; };
Note :
- Listen port 53 Adalah IP Address DNS Server yg digunakan
- Allow Query Adalah Client yg Dapat mengakses DNS Server tsb / Networks yg bisa Akses DNS tsb.
3.Tambahkan zone untuk ns1.hendraz.tk sbb :
# FORWARD ZONE ( HOSTNAME TO IP ADDRESS )
zone "hendraz.tk" IN {
type master;
file "/var/named/forward.zone";
allow-update { none; };
};
# REVERSE ZONE ( IP ADDRESS TO HOSTNAME )
zone "11.168.192.in-addr.arpa" IN {
type master;
file "/var/named/reverse.zone";
allow-update { none; };
};
4.Buat File Forward Zone ( Untuk Hostname )
- vi /var/named/forward.zone
5.Config file Forward Zone sbb :
$ORIGIN hendraz.tk.
$TTL 86400
@ IN SOA ns1.hendraz.tk. hostmaster.hendraz.tk. (
2001062501 ; serial
21600 ; refresh after 6 hours
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL of 1 day
;
;
IN NS ns1.hendraz.tk.
ns1 IN A 192.168.11.11
;
;
@ IN MX 10 mail.hendraz.tk.
mail IN A 192.168.11.11
;
;
; This sample zone file illustrates sharing the same IP addresses
; for multiple services:
;
services IN A 192.168.11.11
ftp IN CNAME services.hendraz.tk.
www IN CNAME services.hendraz.tk.
6.Buat File Reverse Zone ( Untuk IP Address )
- vi /var/named/reverse.zone
7.Config File Reverse Zone sbb :
$ORIGIN 11.168.192.in-addr.arpa.
$TTL 86400
@ IN SOA ns1.hendraz.tk. hostmaster.hendraz.tk. (
2001062501 ; serial
21600 ; refresh after 6 hours
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL of 1 day
;
@ IN NS ns1.hendraz.tk.
11 IN PTR ns1.hendraz.tk.
11 IN PTR ftp.hendraz.tk.
10. Restart Bind
- /etc/init.d/named restart
- service named start
11. Agar Config yg kita buat langsung berjalan ( Autorun )
- chkconfig named on
12. Disable Firewall
- service iptables save
- service iptables stop
- chkconfig iptables off
13. Disable SELinux
- vi /etc/selinux/config
Ubah SELINUX=enforcing menjadi SELINUX=disabled
14. Reboot
Selesai
Ini Hasil nya boss...
Di Linux Fedora 14
[root@fedora hendraz]# dig -x 192.168.11.11
; <<>> DiG 9.7.4b1-RedHat-9.7.4-0.2.b1.fc14 <<>> -x 192.168.11.11
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45158
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;11.11.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
11.11.168.192.in-addr.arpa. 86400 IN PTR ns1.hendraz.tk.
;; AUTHORITY SECTION:
11.168.192.in-addr.arpa. 86400 IN NS ns1.hendraz.tk.
;; ADDITIONAL SECTION:
ns1.hendraz.tk. 86400 IN A 192.168.11.11
;; Query time: 0 msec
;; SERVER: 192.168.11.11#53(192.168.11.11)
;; WHEN: Sat Jun 18 02:08:39 2011
;; MSG SIZE rcvd: 101
[root@fedora hendraz]# dig www.hendraz.tk.
; <<>> DiG 9.7.4b1-RedHat-9.7.4-0.2.b1.fc14 <<>> www.hendraz.tk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17076
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;www.hendraz.tk. IN A
;; ANSWER SECTION:
www.hendraz.tk. 86400 IN CNAME hendraz.tk.
;; AUTHORITY SECTION:
hendraz.tk. 86400 IN SOA ns1.hendraz.tk. hostmaster.hendraz.tk. 2001062501 21600 3600 604800 86400
;; Query time: 0 msec
;; SERVER: 192.168.11.11#53(192.168.11.11)
;; WHEN: Sat Jun 18 02:10:19 2011
;; MSG SIZE rcvd: 96
[root@fedora hendraz]# nslookup www.yahoo.com
Server: 192.168.11.11
Address: 192.168.11.11#53
Non-authoritative answer:
www.yahoo.com canonical name = fpfd.wa1.b.yahoo.com.
fpfd.wa1.b.yahoo.com canonical name = fp.wg1.b.yahoo.com.
fp.wg1.b.yahoo.com canonical name = any-fp.wa1.b.yahoo.com.
Name: any-fp.wa1.b.yahoo.com
Address: 98.137.149.56
Name: any-fp.wa1.b.yahoo.com
Address: 72.30.2.43
Selamat mencoba
Note :
- IP Address untuk DNS Server harus menggunakan IP Statik
- Ganti 11.168.192 tiga oktet pertama jaringan yang anda gunakan
- Juga file zona /var/named/reverse.zone harus tepat. Hal ini juga harus disesuaikan dengan oktet pertama jaringan anda.
- MX digunakan untuk Mail Server
- Saya membuat hanya 1 Dns saja ( Primary Master ) untuk slave ( Secondary Master ) nya bisa lihat
Terima kasih.
Referensi
Fedora-14-Manual-Guide
Rating: 5
Misalkan IP Server 192.168.11.11
Example name server ns1.hendraz.tk
Langsung aja boss
1.Install Bind
- yum install bind
2.Masuk ke direktori named.conf karena konfigurasi akan tersimpan disini
- vi /etc/named.conf
- Ubah Line 11
listen-on port 53 { 127.0.0.1; }; menjadi listen-on port 53 { 192.168.11.11; };
- Ubah Line 17
allow-query { localhost; }; menjadi allow-query { 192.168.11.0/24; };
Note :
- Listen port 53 Adalah IP Address DNS Server yg digunakan
- Allow Query Adalah Client yg Dapat mengakses DNS Server tsb / Networks yg bisa Akses DNS tsb.
3.Tambahkan zone untuk ns1.hendraz.tk sbb :
# FORWARD ZONE ( HOSTNAME TO IP ADDRESS )
zone "hendraz.tk" IN {
type master;
file "/var/named/forward.zone";
allow-update { none; };
};
# REVERSE ZONE ( IP ADDRESS TO HOSTNAME )
zone "11.168.192.in-addr.arpa" IN {
type master;
file "/var/named/reverse.zone";
allow-update { none; };
};
4.Buat File Forward Zone ( Untuk Hostname )
- vi /var/named/forward.zone
5.Config file Forward Zone sbb :
$ORIGIN hendraz.tk.
$TTL 86400
@ IN SOA ns1.hendraz.tk. hostmaster.hendraz.tk. (
2001062501 ; serial
21600 ; refresh after 6 hours
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL of 1 day
;
;
IN NS ns1.hendraz.tk.
ns1 IN A 192.168.11.11
;
;
@ IN MX 10 mail.hendraz.tk.
mail IN A 192.168.11.11
;
;
; This sample zone file illustrates sharing the same IP addresses
; for multiple services:
;
services IN A 192.168.11.11
ftp IN CNAME services.hendraz.tk.
www IN CNAME services.hendraz.tk.
6.Buat File Reverse Zone ( Untuk IP Address )
- vi /var/named/reverse.zone
7.Config File Reverse Zone sbb :
$ORIGIN 11.168.192.in-addr.arpa.
$TTL 86400
@ IN SOA ns1.hendraz.tk. hostmaster.hendraz.tk. (
2001062501 ; serial
21600 ; refresh after 6 hours
3600 ; retry after 1 hour
604800 ; expire after 1 week
86400 ) ; minimum TTL of 1 day
;
@ IN NS ns1.hendraz.tk.
11 IN PTR ns1.hendraz.tk.
11 IN PTR ftp.hendraz.tk.
10. Restart Bind
- /etc/init.d/named restart
- service named start
11. Agar Config yg kita buat langsung berjalan ( Autorun )
- chkconfig named on
12. Disable Firewall
- service iptables save
- service iptables stop
- chkconfig iptables off
13. Disable SELinux
- vi /etc/selinux/config
Ubah SELINUX=enforcing menjadi SELINUX=disabled
14. Reboot
Selesai
Ini Hasil nya boss...
Di Linux Fedora 14
[root@fedora hendraz]# dig -x 192.168.11.11
; <<>> DiG 9.7.4b1-RedHat-9.7.4-0.2.b1.fc14 <<>> -x 192.168.11.11
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 45158
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; QUESTION SECTION:
;11.11.168.192.in-addr.arpa. IN PTR
;; ANSWER SECTION:
11.11.168.192.in-addr.arpa. 86400 IN PTR ns1.hendraz.tk.
;; AUTHORITY SECTION:
11.168.192.in-addr.arpa. 86400 IN NS ns1.hendraz.tk.
;; ADDITIONAL SECTION:
ns1.hendraz.tk. 86400 IN A 192.168.11.11
;; Query time: 0 msec
;; SERVER: 192.168.11.11#53(192.168.11.11)
;; WHEN: Sat Jun 18 02:08:39 2011
;; MSG SIZE rcvd: 101
[root@fedora hendraz]# dig www.hendraz.tk.
; <<>> DiG 9.7.4b1-RedHat-9.7.4-0.2.b1.fc14 <<>> www.hendraz.tk
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17076
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0
;; QUESTION SECTION:
;www.hendraz.tk. IN A
;; ANSWER SECTION:
www.hendraz.tk. 86400 IN CNAME hendraz.tk.
;; AUTHORITY SECTION:
hendraz.tk. 86400 IN SOA ns1.hendraz.tk. hostmaster.hendraz.tk. 2001062501 21600 3600 604800 86400
;; Query time: 0 msec
;; SERVER: 192.168.11.11#53(192.168.11.11)
;; WHEN: Sat Jun 18 02:10:19 2011
;; MSG SIZE rcvd: 96
[root@fedora hendraz]# nslookup www.yahoo.com
Server: 192.168.11.11
Address: 192.168.11.11#53
Non-authoritative answer:
www.yahoo.com canonical name = fpfd.wa1.b.yahoo.com.
fpfd.wa1.b.yahoo.com canonical name = fp.wg1.b.yahoo.com.
fp.wg1.b.yahoo.com canonical name = any-fp.wa1.b.yahoo.com.
Name: any-fp.wa1.b.yahoo.com
Address: 98.137.149.56
Name: any-fp.wa1.b.yahoo.com
Address: 72.30.2.43
Selamat mencoba
Note :
- IP Address untuk DNS Server harus menggunakan IP Statik
- Ganti 11.168.192 tiga oktet pertama jaringan yang anda gunakan
- Juga file zona /var/named/reverse.zone harus tepat. Hal ini juga harus disesuaikan dengan oktet pertama jaringan anda.
- MX digunakan untuk Mail Server
- Saya membuat hanya 1 Dns saja ( Primary Master ) untuk slave ( Secondary Master ) nya bisa lihat
Terima kasih.
Referensi
Fedora-14-Manual-Guide
Rating: 5
{ 3 komentar... read them below or add one }
wah bagus nih TSnya... semoga jadi bermanfaat.. hihihihihi
hohoho .. mantab ...
mantep om tips membuat DNS server di linux nya sukses selalu
Posting Komentar
Blog Ini Bersifat Do Follow yg Berarti dpt Memberikan Backlink Gratis Kpd Blog Anda Jika Berkomentar Dibawah ini :
"Komentar Harus Bersifat Membangun Dan Tidak Menjatuhkan akan Kami Hargai"