BIND: Difference between revisions
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 4: | Line 4: | ||
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]]. | 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]]. | ||
==BIND: Install Ubuntu 24.04== | |||
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== | |||
* https://www.linuxtechi.com/install-configure-bind-9-dns-server-ubuntu-debian/#google_vignette |
Latest revision as of 17:23, 30 December 2024
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.
BIND: Install Ubuntu 24.04
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