Multiple Views DNS
Oleh:
Alfian febriantoro |
10/08/2018 10:57:00 AM
INSTALL PACKET DNS
apt-get install bind9
bind.keys db.empty named.conf named.conf.options serverA
db.0 db.local named.conf.default-zones reverse serverB
db.255 db.root named.conf.local rndc.key zones.rfc1918
edit serverA
###################################################################
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA nusantara.cloud. root.nusantara.cloud. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS nusantara.cloud.
@ IN A 10.10.10.100
www IN A 10.20.20.1
mail IN A 10.10.10.100
ftp IN A 10.20.20.20
@ IN MX 10 10.10.10.100
monitor IN A 10.10.10.1
lnxsrv-b IN A 10.20.20.10
edit serverB
###################################################################
; BIND data file for local loopback interface
;
$TTL 604800
@ IN SOA nusantara.cloud. root.nusantara.cloud. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS nusantara.cloud.
@ IN A 10.10.10.100
www IN A 100.100.50.1
mail IN A 10.10.10.100
ftp IN A 10.20.20.20
@ IN MX 10 10.10.10.100
monitor IN A 10.10.10.1
lnxsrv-c IN A 10.20.20.20
EDIT REVERSE
###################################################################
TAMBAHKAN PERINTAH UNTUK MENGAKTIFKAN FITUR Multiple Views DNS pada named.conf.local
@ IN SOA nusantara.cloud. root.nusantara.cloud. (
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS nusantara.cloud.
20 IN PTR lnxserver-c.nusantara.cloud
10 IN PTR lnxserver-b.nusantara.cloud
EDIT nano named.conf.local
###################################################################
acl internal {10.30.30.0/25;};-----
acl external {100.100.50.0/26;};
view internal {
match-clients { internal; };
zone "nusantara.cloud" {
type master;
file "/etc/bind/serverA";
};
zone "20.20.10.in-addr.arpa" {
type master;
file "/etc/bind/reverse";
};
include "/etc/bind/named.conf.default-zones";
};
view external {
match-clients { external; };
zone "nusantara.cloud" {
type master;
file "/etc/bind/serverB";
};
zone "20.20.10.in-addr.arpa" {
type master;
file "/etc/bind/reverse";
};
include "/etc/bind/named.conf.default-zones";
};
EDIT named.conf
berikan tanda pagar
include "/etc/bind/named.conf.default-zones";
restart bind9