Compare commits

...

3 Commits

Author SHA1 Message Date
8874ddd18a
task 7 2024-10-03 00:03:07 +07:00
ad5d27e3d2
fix task 5 (new conf deleted the CNAME record) 2024-10-03 00:03:01 +07:00
4ec1ed1b4e
task 6 revision
do not add dns slave into nameserver until it is ready

something to do with /var/bind
2024-10-03 00:02:38 +07:00
9 changed files with 72 additions and 6 deletions

View File

@ -4,7 +4,7 @@ cat > /etc/bind/named.conf.local <<EOL
zone "f01.com" { zone "f01.com" {
type slave; type slave;
masters { 10.67.3.3; }; masters { 10.67.3.3; };
file "/etc/bind/Jarkom/f01.com"; file "/var/lib/bind/f01.com";
}; };
EOL EOL

39
PokcoyDNSSlave/07.sh Normal file
View File

@ -0,0 +1,39 @@
#!/bin/bash
mkdir -p /etc/bind/Vitamin
cat >> /etc/bind/named.conf.local <<EOL
zone "vitamin.brokoli.f01.com" {
type master;
file "/etc/bind/Vitamin/vitamin.brokoli.f01.com";
};
EOL
cat > /etc/bind/Vitamin/vitamin.brokoli.f01.com <<EOL
\$TTL 604800
@ IN SOA ns2.pokcoy.f01.com. admin.pokcoy.f01.com. (
20241001 ; Serial (YYYYMMDDNN)
7200 ; Refresh (2 hours)
1800 ; Retry (30 minutes)
43200 ; Expire (12 hours)
1209600 ; Minimum TTL (2 weeks)
)
@ IN NS ns2.pokcoy.f01.com.
ns2 IN A 10.67.3.2 ; IP address of Pokcoy
@ IN A 10.67.4.2 ; IP address of Brokoli
www IN CNAME vitamin.brokoli.f01.com.
EOL
cat > /etc/bind/named.conf.options <<EOL
options {
// dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
allow-query { any; };
};
EOL
service bind9 restart

3
TaugeClient/06.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo "nameserver 10.67.3.2" >> /etc/resolv.conf

View File

@ -4,5 +4,4 @@ echo "nameserver 192.168.122.1" > /etc/resolv.conf
apt-get update apt-get update
apt-get install dnsutils -y apt-get install dnsutils -y
echo "nameserver 10.67.3.3" > /etc/resolv.conf echo "nameserver 10.67.3.3" > /etc/resolv.conf
echo "nameserver 10.67.3.2" >> /etc/resolv.conf

3
TomatClient/06.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
echo "nameserver 10.67.3.2" >> /etc/resolv.conf

View File

@ -4,5 +4,4 @@ echo "nameserver 192.168.122.1" > /etc/resolv.conf
apt-get update apt-get update
apt-get install dnsutils -y apt-get install dnsutils -y
echo "nameserver 10.67.3.3" > /etc/resolv.conf echo "nameserver 10.67.3.3" > /etc/resolv.conf
echo "nameserver 10.67.3.2" >> /etc/resolv.conf

View File

@ -12,7 +12,7 @@ mkdir -p /etc/bind/Jarkom
cat > /etc/bind/Jarkom/f01.com <<EOL cat > /etc/bind/Jarkom/f01.com <<EOL
\$TTL 604800 \$TTL 604800
@ IN SOA ns1.f01.com. admin.f01.com. ( @ IN SOA ns1.f01.com. admin.f01.com. (
2 ; Serial 2 ; Serial
604800 ; Refresh 604800 ; Refresh
86400 ; Retry 86400 ; Retry
2419200 ; Expire 2419200 ; Expire

View File

@ -16,6 +16,9 @@ ns1 IN A 10.67.3.3 ; IP address of DNS Master
brokoli IN A 10.67.4.2 ; IP address of Brokoli brokoli IN A 10.67.4.2 ; IP address of Brokoli
buncis IN A 10.67.4.3 ; IP address of Buncis buncis IN A 10.67.4.3 ; IP address of Buncis
bayam IN A 10.67.4.4 ; IP address of Bayam bayam IN A 10.67.4.4 ; IP address of Bayam
www.bayam IN CNAME bayam.f01.com.
www.brokoli IN CNAME brokoli.f01.com.
EOL EOL
service bind9 restart service bind9 restart

20
WortelDNSMaster/07.sh Normal file
View File

@ -0,0 +1,20 @@
#!/bin/bash
cat >> /etc/bind/Jarkom/f01.com <<EOL
; Delegation for vitamin.brokoli.f01.com
ns2 IN A 10.67.3.2 ; IP delegation
vitamin.brokoli IN NS ns2
EOL
cat > /etc/bind/named.conf.options <<EOL
options {
// dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
listen-on-v6 { any; };
allow-query { any; };
};
EOL
service bind9 restart