cara konfigurasi DNS server ke virtualbox
1. Instal dan Konfigurasi Bind9
- Masukan perintah
apt-get install bind9
cd /etc/bind/
nano named.conf.local
- Tambahkan baris berikut tepat di bawah //include "/etc/bind/zones.rfc1918";
zone "sandi.com" {
type master ;
file "/etc/bind/db.sandi";
};
zone "1.168.192.in-addr.arpa" {
type master ;
file "/etc/bind/db.192" ;
};
- Lalu save dengan perintah ctrl + x lalu y dan enter
- Kemudian kita salin file ke db tersebut
cp db.local db.sandi
cp db.127 db.192
- Setelah itu edit db.sandi
nano db.sandiSesuikan seperti ini
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA sandi.com. root.sandi.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS sandi.com.
@ IN A 192.168.1.37
www IN A 192.168.1.37
- Lalu edit juga db.192
nano db.192sesuaikan seperti ini
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA sandi.com. root.sandi.com. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS sandi.com.
37 IN PTR sandi.com.
37 IN PTR www.sandi.com.
-Kemudian edit resolv
nano /etc/resolv.conftambahkan domain dan ip server anda
search sandi.com
nameserver 192.168.1.37
- Lalu restart bind9
/etc/init.d/bind9 restart
- Instal DNS apache2
apt-get install apache2
- Coba apakah DNS sudah berjalan atau belum
nslookup 192.168.1.37Server: 192.168.1.37
Address: 192.168.1.37#53
37.1.168.192.in-addr.arpa Name= sandi.com.
37.1.168.192.in-addr.arpa Name= www.sandi.com.
nslookup sandi.comServer: 192.168.1.37
Address: 192.168.1.37#53
Name: sandi.com
Address: 192.168.1.37
jika seperti di atas maka sudah berhasil,lihat gambar dibawah
http://sandiardiansyah27.blogspot.com/2017/09/cara-konfigurasi-dns-server-debian-di.html
Comments
Post a Comment