Install DNS Server Debian 12: Perbedaan antara revisi

Dari Dokumentasi Robie
Loncat ke navigasi Loncat ke pencarian
Tidak ada ringkasan suntingan
Tidak ada ringkasan suntingan
Baris 38: Baris 38:
Update sistem dengan mengetikan perintah
Update sistem dengan mengetikan perintah


<code>#apt update (enter)</code>
#apt update (enter)


Jika berhasil akan muncul tampilan berikut
Jika berhasil akan muncul tampilan berikut
 
root@latdns:~# apt update
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]                   
Get:3 http://deb.debian.org/debian bookworm/main amd64 Packages [8788 kB]                 
Get:4 http://security.debian.org bookworm-security InRelease [48.0 kB]                     
Get:5 http://security.debian.org bookworm-security/main amd64 Packages [169 kB]           
Get:6 http://security.debian.org bookworm-security/main Translation-en [102 kB]
Get:7 http://security.debian.org bookworm-security/contrib amd64 Packages [644 B]
Get:8 http://security.debian.org bookworm-security/contrib Translation-en [372 B]
Get:9 http://deb.debian.org/debian bookworm/main Translation-en [6109 kB]                 
Get:10 http://deb.debian.org/debian bookworm/contrib amd64 Packages [54.1 kB]             
Get:11 http://deb.debian.org/debian bookworm/contrib Translation-en [48.8 kB]             
Get:12 http://deb.debian.org/debian bookworm-updates/main amd64 Packages.diff/Index [10.6 kB]
Get:13 http://deb.debian.org/debian bookworm-updates/contrib amd64 Packages.diff/Index [1591 B]
Get:14 http://deb.debian.org/debian bookworm-updates/main amd64 Packages T-2024-04-23-2036.10-F-2023-07-15-1409.27.pdiff [10.6 kB]
Get:14 http://deb.debian.org/debian bookworm-updates/main amd64 Packages T-2024-04-23-2036.10-F-2023-07-15-1409.27.pdiff [10.6 kB]
Get:15 http://deb.debian.org/debian bookworm-updates/contrib amd64 Packages T-2024-02-16-2007.16-F-2024-02-16-2007.16.pdiff [682 B]
Get:15 http://deb.debian.org/debian bookworm-updates/contrib amd64 Packages T-2024-02-16-2007.16-F-2024-02-16-2007.16.pdiff [682 B]
Get:16 http://deb.debian.org/debian bookworm-updates/main Translation-en [16.0 kB]         
Get:17 http://deb.debian.org/debian bookworm-updates/contrib Translation-en [408 B]       
Get:18 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [13.8 kB]         
Fetched 10.0 MB in 3min 5s (54.2 kB/s)                                                     
Reading package lists... Done
Building dependency tree... Done
78 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Repository 'http://deb.debian.org/debian bookworm InRelease' changed its 'Version' value from '12.0' to '12.6'
root@latdns:~#





Revisi per 1 Agustus 2024 02.56

Pastikan server sudah mendapatkan ip address. Cek dengan cara mengetikan

#ip a (enter)

Jika sudah muncul tampilan berikut, artinya sudah mendpatkan ip address

root@latdns:~# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0@if114: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether 76:69:11:b8:38:cd brd ff:ff:ff:ff:ff:ff link-netnsid 0
    inet 192.168.20.9/24 brd 192.168.20.255 scope global dynamic eth0
       valid_lft 1717sec preferred_lft 1717sec
    inet6 fe80::7469:11ff:feb8:38cd/64 scope link 
       valid_lft forever preferred_lft forever
root@latdns:~# 

Lalu cek koneksi internet dengan mengetikkan perintah

#ping google.com (enter)

Jika muncul tampilan seperti ini artinya sudah ada koneksi internet

root@latdns:~# ping google.com
PING google.com (216.239.38.120) 56(84) bytes of data.
64 bytes from any-in-2678.1e100.net (216.239.38.120): icmp_seq=1 ttl=117 time=32.1 ms
64 bytes from any-in-2678.1e100.net (216.239.38.120): icmp_seq=3 ttl=117 time=31.7 ms
64 bytes from any-in-2678.1e100.net (216.239.38.120): icmp_seq=4 ttl=117 time=31.4 ms
64 bytes from any-in-2678.1e100.net (216.239.38.120): icmp_seq=5 ttl=117 time=31.8 ms
^C
--- google.com ping statistics ---
5 packets transmitted, 4 received, 20% packet loss, time 5056ms
rtt min/avg/max/mdev = 31.413/31.726/32.059/0.232 ms
root@latdns:~# 

Update sistem dengan mengetikan perintah

#apt update (enter)

Jika berhasil akan muncul tampilan berikut

root@latdns:~# apt update
Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB]
Get:2 http://deb.debian.org/debian bookworm-updates InRelease [55.4 kB]                     
Get:3 http://deb.debian.org/debian bookworm/main amd64 Packages [8788 kB]                   
Get:4 http://security.debian.org bookworm-security InRelease [48.0 kB]                      
Get:5 http://security.debian.org bookworm-security/main amd64 Packages [169 kB]             
Get:6 http://security.debian.org bookworm-security/main Translation-en [102 kB]
Get:7 http://security.debian.org bookworm-security/contrib amd64 Packages [644 B]
Get:8 http://security.debian.org bookworm-security/contrib Translation-en [372 B]
Get:9 http://deb.debian.org/debian bookworm/main Translation-en [6109 kB]                   
Get:10 http://deb.debian.org/debian bookworm/contrib amd64 Packages [54.1 kB]               
Get:11 http://deb.debian.org/debian bookworm/contrib Translation-en [48.8 kB]               
Get:12 http://deb.debian.org/debian bookworm-updates/main amd64 Packages.diff/Index [10.6 kB]
Get:13 http://deb.debian.org/debian bookworm-updates/contrib amd64 Packages.diff/Index [1591 B]
Get:14 http://deb.debian.org/debian bookworm-updates/main amd64 Packages T-2024-04-23-2036.10-F-2023-07-15-1409.27.pdiff [10.6 kB]
Get:14 http://deb.debian.org/debian bookworm-updates/main amd64 Packages T-2024-04-23-2036.10-F-2023-07-15-1409.27.pdiff [10.6 kB]
Get:15 http://deb.debian.org/debian bookworm-updates/contrib amd64 Packages T-2024-02-16-2007.16-F-2024-02-16-2007.16.pdiff [682 B]
Get:15 http://deb.debian.org/debian bookworm-updates/contrib amd64 Packages T-2024-02-16-2007.16-F-2024-02-16-2007.16.pdiff [682 B]
Get:16 http://deb.debian.org/debian bookworm-updates/main Translation-en [16.0 kB]          
Get:17 http://deb.debian.org/debian bookworm-updates/contrib Translation-en [408 B]         
Get:18 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [13.8 kB]          
Fetched 10.0 MB in 3min 5s (54.2 kB/s)                                                      
Reading package lists... Done
Building dependency tree... Done
78 packages can be upgraded. Run 'apt list --upgradable' to see them.
N: Repository 'http://deb.debian.org/debian bookworm InRelease' changed its 'Version' value from '12.0' to '12.6'
root@latdns:~# 


Install aplikasi bind9

#apt install bind9 (enter)

Jika muncul tampilan berikut artinya proses instalasi berhasil

#cd /etc/bind/ (enter)
#cp named.conf.local named.conf.old
#nano named.conf.local
zone "robie.tkj1" {
        type master;
        file "/etc/bind/db.robie";
};

zone "8.20.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.192";
};


#cp db.local db.robie
#nano db.robie
;
; BIND data file for local loopback interface
;
$TTL    604800

@       IN      SOA     robie.tkj1. root.robie.tkj1. (  

                              2         ; Serial
                         604800         ; Refresh 
                         86400         ; Retry
                       2419200         ; Expire
                         604800 )       ; Negative Cache TTL
 
;
@       IN      NS      robie.tkj1.
@       IN      A       192.168.20.8
www     IN      A       192.168.20.8
mail    IN      A       192.168.20.8
ftp     IN      A       192.168.20.8


#cp db.255 db.192
#nano db.192
;
;BIND reverse data file for broadcast zone

;

$TTL    604800
@       IN      SOA     robie.tkj1. root.robie.tkj1. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;

@       IN      NS      robie.tkj1.
l       IN      PTR     robie.tkj1.


#nano /etc/resolv.conf
nameserver 192.168.20.1
nameserver 180.250.245.142
nameserver 180.250.245.133


#systemctl restart bind9
#</nowiki>systemctl status bind9
* named.service - BIND Domain Name Server

     Loaded: loaded (/lib/systemd/system/named.service; enabled; preset: enabled)
     Active: active (running) since Wed 2024-07-31 00:52:24 UTC; 29min ago
       Docs: man:named(8)
   Main PID: 3473 (named)
     Status: "running"
      Tasks: 5 (limit: 38314)
     Memory: 6.6M
        CPU: 1.003s
     CGroup: /system.slice/named.service
             `-3473 /usr/sbin/named -f -u bind


Pengujian

masuk ke windows lalu buka cmd, lalu ketikkan

C:\Users\USER>nslookup robie.tkj1


8.20.168.192.in-addr.arpa
        primary name server = robie.tkj1
        responsible mail addr = root.robie.tkj1
        serial  = 1
        refresh = 604800 (7 days)
        retry   = 86400 (1 day)
        expire  = 2419200 (28 days)
        default TTL = 604800 (7 days)
Server:  UnKnown
Address:  192.168.20.8
Name:    robie.tkj1
Address:  192.168.20.8