Cara Instalasi dan Konfigursi DNS SERVER Linux Debian Melalui Virtual Box
Berikut Kode yg bisa kalian gunakan.
Hanya merubah beberapa kode seerti IP & Domain.
nano /etc/network/interfaces
# The primary network interface
auto enp0s3
iface enp0s3 inet static
address 192.168.20.17
netmask 255.255.255.0
gateaway 192.168.20.1
dns-search adam.com
dns-nameservers 192.168.20.17 192.168.20.1
exit / yes
/etc/init.d/networking restart
nano /etc/resolve.c0nf
nameserver 192.168.20.17
nameserver 192.168.20.1
keluar
apt-cdrom add
(masukkan kaset ke 2)
apt-cdrom add
(masukkan kaset ke 3)
nano /etc/apt/sources.list
TAB BARU
apt install bind9 dnsutils
y
(Masukkan Kaset 1)
(Masukkan Kaset 2)
cd /etc/bind
……. cp db.local db.adam
……. cp db.127 db.192
……. nano named.conf.lokal
zone “adam.com” {
type master;
file “/etc/bind/db.adam”;
};
zone “20.168.192.in-addr.arpa” {
type master;
file “/etc/bind/db.192”;
};
keluar
balik ke nano named.conf.local
zone “adam.com” {
type master;
file “/etc/bind/db.adam”;
};
zone “20.168.192.in-addr.arpa” {
type master;
file “/etc/bind/db.192”;
};
keluar
nano /etc/hosts
TAB BARU
127.0.1.1 adam diubah menjadi 192.168.20.17 adam.com adam
KELUAR
systemctl restart bind9
nano db.adam
TAB BARU
localhost root.localhost. ( diganti adam.com. root.adam.com. (
Terus Bawahnya diganti juga Localhostnya
@ Localhost bawah diganti adam.com
@ A 192.168.20.17
www A 192.168.20.17
Balik ke systemctl restart bind9
nano db.192
localhost. root.localhost. { diganti ns.adam.com. root.adam.com. {
bawahnya
localhost diganti ns.adam.com
17.0.0 localhost diganti 17 ns.adam.com
17 IN PTR www.adam.com
17 IN PTR mail.adam.com
KELUAR
nano named.conf.options
TAB BARU
//forwarders {;
//0.0.0.0.0
// };
diubah menjadi
forwarders }
192.168.20.1;
0.0.0.0;
};
KELUAR
kembali ke systemctl restart bind9
status bind9
TAB BARU
nslookup 192.168.20.17
nslookup adam.com
Lalu buka kontrol Panel
lalu ke Jaringan dan Internet
pilih lihat status
lalu klik change adapter
klik kanan virtual box host only
lalu properties
lalu tekan internet protocol version 4 (TCP/IPv4)
lalu ganti IP ADDRESS: 192.168.20.50
lalu ubah Prefered DNS Server: 192.168.20.17
lalu ubah juga Alternative DNS Server: 192.168.20.1
lalu klik OK
lalu buka CMD
nslookup 192.168.20.17
by 12 MIPA 6 – 12. DIVIA NADIATUZ ZULFA
linux dns server