BIND: Install Ubuntu 24.04

From OnnoWiki
Revision as of 15:44, 27 August 2024 by Onnowpurbo (talk | contribs) (Created page with "Sumber: https://www.linuxtechi.com/install-configure-bind-9-dns-server-ubuntu-debian/#google_vignette sudo apt update sudo apt install -y bind9 bind9utils bind9-doc dnsuti...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Sumber: https://www.linuxtechi.com/install-configure-bind-9-dns-server-ubuntu-debian/#google_vignette


sudo apt update
sudo apt install -y bind9 bind9utils bind9-doc dnsutils


sudo vi /etc/bind/named.conf.options
acl internal-network {
192.168.0.0/24;
};
options {
        directory "/var/cache/bind";
        allow-query { localhost; internal-network; };
        allow-transfer { localhost; };
        forwarders { 8.8.8.8; };
        recursion yes;
        dnssec-validation auto;
        listen-on-v6 { any; };
};



$ cd /etc/bind
$ sudo vi named.conf.local
zone "linuxtechi.local" IN {
        type master;
        file "/etc/bind/forward.linuxtechi.local";
        allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
        type master;
        file "/etc/bind/reverse.linuxtechi.local";
        allow-update { none; };
};



$ cd /etc/bind
$ sudo cp db.local forward.linuxtechi.local
$ sudo vi forward.linuxtechi.local
$TTL 604800
@ IN SOA primary.linuxtechi.local. root.primary.linuxtechi.local. (
                                   2022072651 ; Serial
                                   3600 ; Refresh
                                   1800 ; Retry
                                   604800 ; Expire
                                   604600 ) ; Negative Cache TTL
;Name Server Information
@       IN  NS    primary.linuxtechi.local.

;IP address of Your Domain Name Server(DNS)
primary IN  A     192.168.0.40

;Mail Server MX (Mail exchanger) Record
linuxtechi.local. IN MX 10   mail.linuxtechi.local.

;A Record for Host names
www     IN  A    192.168.0.50
mail    IN  A    192.168.0.60

;CNAME Record
ftp     IN CNAME www.linuxtechi.local.




Referensi