Linux

[Part 1] DNS Server Debian 10

Wednesday, 16th September 2020

Hallow semua, saya coba memulai membuat tutorial lagi seputar materi ajar khususnya, nah kali ini adalah versi series linux, materi pemula bagi teman-teman yang baru belajar linux, selamat mencoba.

Soal: Buatlah domain tkj.net, siswa.tkj.net, cinta.bersemi.di.tkj.net dan smk.net dalam 1 server, dan aktifkan DNS Forwarder.

Install DNS Server pada Debian 10 pada VM

  1. Setting VM supaya dapat terkoneksi dengan internet
  2. Install debian, jangan lupa aktifkan SSH Server
  3. Setting IP Address (DHCP/Static)

root#nano /etc/network/interface
## DHCP Mode ##
——————/etc/network/interface —————————
auto enp0s3
allow-hotplug enp0s3
iface eth0 inet dhcp
—–jika interface bernama enp0s3, jika tidak disesuaikan ——Ctrl+x,Y
## Static Mode ##
——————/etc/network/interface —————————
auto enp0s3
allow-hotplug enp0s3
iface enp0s3 inet static
address 10.10.10.240/24
gateway 10.10.10.1
—–jika interface bernama enp0s3, jika tidak disesuaikan ——Ctrl+x,Y
##Restart network interface ###
root#/etc/init.d/networking restart
atau
root#systemctl restart networking

4. Pastikan VM sudah terkoneksi ke internet(ping google.com) dan Main OS (menggunakan mode bridge)
5. Login ke VM menggunakan putty
6. Setting repository

root#nano /etc/apt/sources.list

Repository Lokal (IIX) Debian 10
deb http://kebo.vlsm.org/debian/ buster main contrib non-free
deb http://kebo.vlsm.org/debian/ buster-updates main contrib non-free
deb http://kebo.vlsm.org/debian-security/ buster/updates main contrib non-free

Repo Lokal IIX Kambing
deb http://kambing.ui.ac.id/debian buster main contrib non-free
deb-src http://kambing.ui.ac.id/debian buster main contrib non-free

Repo Datautama
deb http://kartolo.sby.datautama.net.id/debian/ buster main contrib non-free
deb http://kartolo.sby.datautama.net.id/debian/ buster-updates main contrib non-free
deb http://kartolo.sby.datautama.net.id/debian-security/ buster/updates main contrib non-free

7. Install DNS Server

root#apt -y install bind9 bind9utils dnsutils

proses configurasi DNS Server ####
8. Setting DNS record, (db.tkj dan db.10)

root#cp /etc/bind/db.local /etc/bind/db.tkj [enter]
root#cp /etc/bind/db.127 /etc/bind/db.10 [enter]
root#nano /etc/bind/db.tkj
root#nano /etc/bind/db.10
root#nano /etc/bind/named.conf.local

## Restart DNS Server ##
root#/etc/init.d/bind9 restart

 

9. Ubah NS/DNS VM ke DNS Lokal misal ip local 10.10.10.240

root#nano /etc/resolv.conf
————– resolv.conf ——
nameserver 10.10.10.240
——————————–Ctrl+x,Y

10. Cek dig tkj.net dan siswa.tkj.net

## Konfigurasi DNS Forwarder ##

11. Edit file named.conf.option

root#nano /etc/bind/named.conf.options
———-/etc/bind/named.conf.option | tambahkan/ubah menjadi seperti dibawah ini
forwarders {
8.8.8.8;
8.8.4.4;
}
recursion yes;
forward only;
dnssec-enable yes;
dnssec-validation yes;
auth-nxdomain no;
————————–simpan Ctrl+x,Y
root#/etc/init.d/bind9 restart

12. Cek ping ke google.com dari console VM, pastikan resolv.conf hanya ada ip 10.10.10.240
13. Beralih ke windows, ganti DNS record IP ke 10.10.10.240, Save
14. Coba ping tkj.net, smkdki.net dan google.com pastikan ip local dan public bisa ter resolve.
15. Selesai.

Materi Video

Popular Posts

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *