DNS Server - Kikisomantri/adminitrasi_jaringan GitHub Wiki
Instalasi dan Konfigurasi DNS Server Pada Ubuntu Server 16.04 Konfigurasi IP Address
nano /etc/network/interfaces
Isikan konfigurasi Ip Address seperti dibawah
#The primary network interface
auto enp0s3
iface enp0s3 inet static <- Alamat Ip Server
address 192.168.5.5
netmask 255.255.255.0
network 192.168.5.0
dns-nameservers 192.168.5.5
dns-search bem.poltektedc.org
auto enp0s8
iface enp0s8 inet dhcp <- Alamat Ip ISP Untuk Koneksi ke Internet
Install DNS Server
apt-get install bind9
Masuk ke Direktori Bind9
cd /etc/bind
Konfigurasi File named.conf.local
nano named.conf.local
Isikan konfigurasi Seperti Dibawah
zone "bem.poltektedc.org" {
type master;
file "/etc/bind/db.1";
};
zone "5.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.2";
};
Sesudah itu save konfigurasinya dengan ctrl+x y Enter
Copykan file db.local ke db.1 dan db.127 ke db.2
cp db.local db.1
cp db.127 db.2
Lalu Konfigurasi File db.1
nano db.1
Lalu Sesuaikan konfigurasi seperti dibawah
;
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA bem.poltektedc.org. root.bem.poltektedc.org. (
``2 ; Serial``
``604800 ; Refresh``
``86400 ; Retry``
``2419200 ; Expire``
``604800 ) ; Negative Cache TTL``
;
@ IN NS bem.poltektedc.org.
IN A 192.168.5.5
IN A 192.168.5.5
www IN A 192.168.5.5
Sesudah Itu Save Konfigurasinya Tekan ctrl+X y enter
Lalu Konfigurasi File db.2
;
; BIND reverse data file for local loopback interface
;
$TTL 604800
@ IN SOA bem.poltektedc.org. root.bem.poltektedc.org. (
``1 ; Serial``
``604800 ; Refresh``
``86400 ; Retry``
``2419200 ; Expire``
``604800 ) ; Negative Cache TTL``
;
@ IN NS bem.poltektedc.org.
5 IN PTR bem.poltektedc.org.
Sesudah Itu Save Konfigurasinya Tekan ctrl+X y enter
Lalu Konfigurasi Hosts Server
Lalu Sesuaikan Konfigurasinya Seperti Dibawah
127.0.0.1 localhost
192.168.5.5 bem.poltektedc.org
The following lines are desirable for IPv6 capable hosts
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
Sesudah Itu Save Konfigurasinya Tekan ctrl+X y enter
Sesudah Semuanya Selesai Restart Service Bind9 dan Network Interfaces
/etc/init.d/bind9 restart
/etc/init.d/networking restart
Lalu Coba DNS Server Yang Telah Dibuat Dengan Perintah nslookup
nslookup bem.poltektedc.org
Kalau Berhasil Maka Hasilnya Akan Sama Seperti Dibawah
Server: 192.168.5.5
Address: 192.168.5.5#53
Name: bem.poltektedc.org
Address: 192.168.5.5
Coba nslookup Lagi Dengan Menggunakan Ip Server
nslookup 192.168.5.5
Kalau Berhasil Maka Hasilnya Akan Sama Seperti Dibawah
Server: 192.168.5.5
Address: 192.168.5.5#53
5.5.168.192.in-addr.arpa name = bem.poltektedc.org.