Pada hari kedua Training Cloud Server and Virtualization di IDN Semarang ini yaitu yang pertama membahas tentang Install DNS Server pada Ubuntu Server 16.04.
DNS (Domain Name System) adalah sebuah sistem yang menyimpan informasi tentang nama host maupun nama domain dalam bentuk basis data tersebar (distributed database) di dalam jaringan komputer.
Langkah pertama untuk membuat DNS pada ubuntu server 16.04 yaitu
- Install DNS Server Bind9
apt install bind9 dnsutils
- Masuk ke editor nano untuk file named.conf.local
Kemudian salin code dibawah ini untuk membuat Zone Forwarder dan Zone Resolve
root@connecton:/etc/bind# nano named.conf.local
#VSCHOOLZONE
#Zone Forwarder
zone "vschool.lan"{
type master;
file"/etc/bind/zone/vschool.fw"; (Bebas)
};
#Zone Resolve
zone"1.168.192.in-addr.arpa"{ (pembacaan IP terbalik)
type master;
file"/etc/bind/zone/vschool.rs"; (bebas)
};
#VSCHOOLZONE
#Zone Forwarder
zone "vschool.lan"{
type master;
file"/etc/bind/zone/vschool.fw"; (Bebas)
};
#Zone Resolve
zone"1.168.192.in-addr.arpa"{ (pembacaan IP terbalik)
type master;
file"/etc/bind/zone/vschool.rs"; (bebas)
};
- Kemudian buat 2 buah file untuk membuat file penyimpanan vschool.fw dan vschool.rs
root@connecton:/etc/bind/zone# nano vshcool.fw
root@connecton:/etc/bind/zone# nano vshcool.rs
root@connecton:/etc/bind/zone# nano vshcool.rs
- Lalu ketik seperti pada code dibawah ini
root@connecton:/etc/bind/zone# nano vshcool.fw
; BIND reverse data file for empty rfc1918 zone
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
$TTL 86400
@ IN SOA vschool.lan. root.vschool.lan. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS vschool.lan.
@ IN A 10.10.10.1
www IN A 10.10.10.1
-------------------------------------------------------------------------------------------------------
root@connecton:/etc/bind/zone# nano vshcool.fw
; BIND reverse data file for empty rfc1918 zone
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
$TTL 86400
@ IN SOA vschool.lan. root.vschool.lan. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS vschool.lan.
1 IN PTR vschool.lan.
1 IN PTR www.vschool.lan.
; BIND reverse data file for empty rfc1918 zone
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
$TTL 86400
@ IN SOA vschool.lan. root.vschool.lan. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS vschool.lan.
@ IN A 10.10.10.1
www IN A 10.10.10.1
-------------------------------------------------------------------------------------------------------
root@connecton:/etc/bind/zone# nano vshcool.fw
; BIND reverse data file for empty rfc1918 zone
;
; DO NOT EDIT THIS FILE - it is used for multiple zones.
; Instead, copy it, edit named.conf, and use that copy.
;
$TTL 86400
@ IN SOA vschool.lan. root.vschool.lan. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
86400 ) ; Negative Cache TTL
;
@ IN NS vschool.lan.
1 IN PTR vschool.lan.
1 IN PTR www.vschool.lan.
- Setelah mengkonfig vschool.fw dan vschool.rs kemudian restart service bind9 dengan cara
root@connecton:/etc/bind/zone# /etc/init.d/bind9 restart
- Kemudian lakukan resolving DNS dengan cara
root@connecton:/etc/bind/zone# nano/etc/resolv.conf
nameserver 127.0.0.1
#nameserver 8.8.8.8
nameserver 127.0.0.1
#nameserver 8.8.8.8
- Cek menggunakan nslookup
root@connecton:/etc/bind/zone# nslookup <ip_vm>
Server: 127.0.0.1
Address: 127.0.0.1#53
1.10.10.10.in-addr.arpa name = www.vschool.lan.
1.10.10.10.in-addr.arpa name = vschool.lan.
root@connecton:/etc/bind/zone# nslookup <dns>
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: vschool.lan
Address: 10.10.10.1
Server: 127.0.0.1
Address: 127.0.0.1#53
1.10.10.10.in-addr.arpa name = www.vschool.lan.
1.10.10.10.in-addr.arpa name = vschool.lan.
root@connecton:/etc/bind/zone# nslookup <dns>
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: vschool.lan
Address: 10.10.10.1
- Masuk ke Network Windows lalu klik kanan. Kemudian Setting DNS Server menggunakan IP host dari IP VM yang sudah dikonfig untuk DNS
Network VirtualBox Host-Only |
1 comments:
Write commentsok min, makasih banyak sudah share
Replysolder uap
EmoticonEmoticon