ISPROOT

vi /etc/bind/named.conf.options
### vi ###
options {
directory "/var/cache/bind";
recursion yes;
allow-query { any; };
forwarders {
3.3.3.2;
};
};
### vi ###
vi /etc/bind/named.conf.default-zones
### vi ###
zone "." {
type master;
file "/etc/bind/db.root";
};
### vi ###
cp /etc/bind/db.local /etc/bind/db.root
vi /etc/bind/db.root
### vi ###
@ IN SOA ns.root-servers.net. admin.root-servers.net. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.root-servers.net.
ns.root-servers.net. IN A 3.3.3.1
ns.tld-servers.net. IN A 3.3.3.2
com IN NS ns.tld-servers.net.
### vi ###
systemctl enable --now bind9
systemctl restart bind9
systemctl status bind9
ISPTLD

vi /etc/bind/named.conf.options
### vi ###
options {
directory "/var/cache/bind";
recursion no;
allow-query { any; };
};
### vi ###
vi /etc/bind/named.conf.default-zones
### vi ###
zone "com" {
type master;
file "/etc/bind/db.com";
};
### vi ###
cp /etc/bind/db.local /etc/bind/db.com
vi /etc/bind/db.com
### vi ###
@ IN SOA ns.tld-servers.net. admin.tld-servers.net. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.tld-servers.net.
ns.corp.com. IN A 1.1.1.1
ns.isp.com. IN A 3.3.3.3
CORP.COM IN NS ns.corp.com.
ISP.COM IN NS ns.isp.com.
### vi ###
systemctl enable --now bind9
systemctl restart bind9
systemctl status bind9
ISPLNX

vi /etc/bind/named.conf.options
### vi ###
options {
directory "/var/cache/bind";
recursion yes;
allow-query { any; };
forwarders {
8.8.8.8;
1.1.1.1;
};
};
### vi ###
vi /etc/bind/named.conf.default-zones
### vi ###
zone "isp.com" {
type master;
file "/etc/bind/db.isp.com";
};
### vi ###
cp /etc/bind/db.local /etc/bind/db.isp.com
vi /etc/bind/db.isp.com
### vi ###
@ IN SOA ns.isp.com. admin.isp.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.isp.com.
ns IN A 3.3.3.3
www IN A 3.3.3.3
ntp IN A 3.3.3.3
crl IN A 3.3.3.3
mx IN A 3.3.3.3
time IN A 3.3.3.3
@ IN MX 10 mx.isp.com.
mx IN A 3.3.3.3
### vi ###
systemctl enable --now bind9
systemctl restart bind9
systemctl status bind9
DC

vi /etc/bind/named.conf.options
### vi ###
options {
directory "/var/cache/bind";
recursion yes;
allow-query { 192.168.0.0/24; };
forwarders {
8.8.8.8;
1.1.1.1;
};
};
### vi ###
vi /etc/bind/named.conf.default-zones
### vi ###
zone "corp.local" {
type master;
file "/etc/bind/db.corp.local";
};
zone "corp.com" {
type master;
file "/etc/bind/db.corp.com";
};
### vi ###
cp /etc/bind/db.local /etc/bind/db.corp.local
vi /etc/bind/db.corp.local
### vi ###
@ IN SOA ns.corp.com. admin.corp.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.corp.com.
dc IN A 192.168.0.1
server IN A 192.168.0.2
docker IN A 192.168.0.3
jenkins IN A 192.168.0.4
gitea IN A 192.168.0.254
cicd IN A 192.168.0.254
sql IN A 192.168.0.2
www IN A 192.168.0.2
crl IN A 192.168.0.2
mx IN A 192.168.0.2
@ IN MX 10 mx.corp.local.
mx IN A 192.168.0.2
### vi ###
cp /etc/bind/db.local /etc/bind/db.corp.com
vi /etc/bind/db.corp.com
### vi ###
@ IN SOA ns.corp.com. admin.corp.com. (
2 ; Serial
604800 ; Refresh
86400 ; Retry
2419200 ; Expire
604800 ) ; Negative Cache TTL
;
@ IN NS ns.corp.com.
ns IN A 1.1.1.1
www IN A 1.1.1.1
crl IN A 1.1.1.1
### vi ###
systemctl enable --now bind9
systemctl restart bind9
systemctl status bind9