EMail: Mempersiapkan DNS dan MX record IPv6

From OnnoWiki
Revision as of 05:38, 21 February 2019 by Onnowpurbo (talk | contribs) (→‎Restart)
Jump to navigation Jump to search

Lakukan di DNS Server, Server A dengan alamat IPv6 2345::1. Konsekuensinya setup semua file

/etc/resolv.conf
nameserver 2345::1


Instalasi BIND

Instalasi

apt -y install bind9 bind9utils bind9-doc


Setup named.conf.local

Edit

sudo vi /etc/bind/named.conf.local

Forward zone

zone "coba1.id" {
    type master;
    file "/etc/bind/zones/coba1.id"; # zone file path
};

zone "coba2.id" {
    type master;
    file "/etc/bind/zones/coba2.id"; # zone file path
};


Isi Forward Zone coba1.id

Buat dan edit

sudo mkdir /etc/bind/zones
cd /etc/bind/zones
sudo cp ../db.local ./coba1.id
sudo vi /etc/bind/zones/coba1.id

coba1.id isinya di ubah menjadi, misalnya,

$TTL    604800
@       IN      SOA     ns1.coba1.id. admin.coba1.id. (
                  3       ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
; name servers - NS records
@                    IN   NS      ns1.coba1.id.

; name servers - AAAA records
@                    IN   AAAA   2345::1
ns1.coba1.id.        IN   AAAA   2345::1

; MX server
coba1.id.            IN   MX  10 coba1.id.


Isi Forward Zone coba2.id

Buat dan edit

sudo mkdir /etc/bind/zones
cd /etc/bind/zones
sudo cp ../db.local ./coba2.id
sudo vi /etc/bind/zones/coba2.id

coba2.id isinya di ubah menjadi, misalnya,

$TTL    604800
@       IN      SOA     ns1.coba2.id. admin.coba2.id. (
                  3       ; Serial
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL
;
; name servers - NS records
@                    IN   NS      ns1.coba2.id.

; name servers - AAAA records
@                    IN   AAAA   2345::2
ns1.coba2.id.        IN   AAAA   2345::2

; MX server
coba2.id.            IN   MX  10 coba2.id.

Cek

Jalankan perintah

sudo named-checkconf

Cek zone tertentu

sudo named-checkzone coba1.id /etc/bind/zones/db.coba1.id
sudo named-checkzone coba2.id /etc/bind/zones/db.coba2.id

Pastikan tidak ada error


Restart

Restart BIND

/etc/init.d/bind9 restart

Pranala Menarik