BIND

From DamaniaWiki
Revision as of 17:21, 30 December 2024 by Jakasora (talk | contribs)

BIND singkatan dari (Berkeley Internet Name Domain) adalah program standard yang secara de facto digunakan untuk layanan DNS di Internet. Ketika Bind terinstal dan dijalankan, akan bertindak sebagai caching server (tidak perlu melakukan konfigurasi tambahan). Pada sistem operasi Linux, BIND pada umumnya didapatkan dari paket seperti .DEB untuk Debian atau sebuah paket RPM untuk RedHat. Instalasi dari sebuah paket biasanya merupakan cara termudah. Dalam Debian, dapat di install dengan menggunakan perintah

apt-get install bind9

Selain itu untuk menjalankan cache, BIND juga dapat menjadi mesin authoritas sebuah zona, bertindak sebagai slave untuk authoritas zona, melaksanakan split horizon, dan melakukan semua yang mungkin dengan DNS.


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.



systemctl status named
sudo systemctl start named
sudo systemctl enable named
sudo ss -lnptu | grep named



Referensi