DNS Virtual Labs
DNS Virtual Labs
$ ssh-keygen -t rsa
Virtual Labs SSH User : idnic
Virtual Labs SSH JumpBox : vlab.idnic.net | port
60502
:
vlab.idnic.net | port 61002
:
vlab.idnic.net | port 61502
$ ssh -p 60502 idnic@vlab.idnic.net
$ ssh -p 61002 :
idnic@vlab.idnic.net
vlab.idnic.net | port $ ssh
62002 -p 61502 idnic@vlab.idnic.net
$ ssh -p 62002 idnic@vlab.idnic.net
Virtual Labs Networks : 172.31.0.0/20
BIND9 SSH User : root
BIND9 Master Server : 172.19.20.20
BIND9 Slave Server : 172.19.20.21
BIND9 Networks : 172.19.0.0/18
$ ssh root@172.19.20.20
$ ssh root@172.19.20.21
bind / named - master
# systemctl status named
# netstat -nltu
# ls -l /etc/bind/
# vi /etc/bind/named.conf.options
forwarders {
1.1.1.1;
};
dnssec-validation no;
…
bind / named - master
listen-on-v6 {
none;
};
listen-on port 53 {
127.0.0.1;
172.19.20.20;
};
allow-query {
172.19.0.0/18;
172.31.0.0/20;
};
bind / named - master
# named-checkconf -p
# netstat -nltup
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
include "/etc/bind/named.conf.cool-zones";
bind / named - master
# vi /etc/bind/named.conf.cool-zones
zone "19.172.in-addr.arpa" {
type master;
file "db.19.172";
allow-update { none; };
allow-transfer { 172.19.20.21; };
also-notify { 172.19.20.21; };
};
…
bind / named - master
…
zone "idnic.cool" {
type master;
file "db.cool";
allow-update { none; };
allow-transfer { 172.19.20.21; };
also-notify { 172.19.20.21; };
};
…
bind / named - master
# vi /var/cache/bind/db.19.172
$TTL 86400
1 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
@ IN NS ns1.idnic.cool.
$TTL 604800
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
@ IN NS ns1.idnic.cool.
ns1 IN A 172.19.20.20
ns2 IN A 172.19.20.21
bind / named - master
# named-checkconf -p
# netstat -nltu
# ls -l /etc/bind/
# vi /etc/bind/named.conf.options
forwarders {
1.1.1.1;
};
dnssec-validation no;
…
bind / named - slave
listen-on-v6 {
none;
};
listen-on port 53 {
127.0.0.1;
172.19.20.21;
};
allow-query {
172.19.0.0/18;
172.31.0.0/20;
};
bind / named - master
# named-checkconf -p
# netstat -nltup
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
include "/etc/bind/named.conf.cool-zones";
bind / named - slave
# vi /etc/bind/named.conf.cool-zones
zone "19.172.in-addr.arpa" {
type slave;
file "db.19.172";
allow-update { none; };
masters { 172.19.20.20; };
};
…
bind / named - slave
…
zone "idnic.cool" {
type slave;
file "db.cool";
allow-update { none; };
masters { 172.19.20.20; };
};
…
bind / named - slave
# named-checkconf -p