Compare commits

..

2 Commits

Author SHA1 Message Date
de48188202
task 6 2024-10-02 20:37:29 +07:00
301e6c873b
task 5 2024-10-02 20:19:44 +07:00
6 changed files with 62 additions and 2 deletions

11
PokcoyDNSSlave/06.sh Normal file
View File

@ -0,0 +1,11 @@
#!/bin/bash
cat > /etc/bind/named.conf.local <<EOL
zone "f01.com" {
type slave;
masters { 10.67.3.3; };
file "/etc/bind/Jarkom/f01.com";
};
EOL
service bind9 restart

7
PokcoyDNSSlave/setup.sh Normal file
View File

@ -0,0 +1,7 @@
#!/bin/bash
echo "nameserver 192.168.122.1" > /etc/resolv.conf
apt-get update
apt-get install bind9 -y
echo "nameserver 10.67.3.3" > /etc/resolv.conf

View File

@ -5,3 +5,4 @@ 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

@ -5,3 +5,4 @@ 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

21
WortelDNSMaster/05.sh Normal file
View File

@ -0,0 +1,21 @@
#!/bin/bash
cat > /etc/bind/Jarkom/f01.com <<EOL
\$TTL 604800
@ IN SOA ns1.f03.com. admin.f03.com. (
2024100101 ; Serial
7200 ; Refresh
1800 ; Retry
43200 ; Expire
1209600 ) ; Negative Cache TTL
@ IN NS ns1.f03.com.
ns1 IN A 10.67.3.3 ; IP address of DNS Master
brokoli IN A 10.67.4.2 ; IP address of Brokoli
buncis IN A 10.67.4.3 ; IP address of Buncis
bayam IN A 10.67.4.4 ; IP address of Bayam
EOL
service bind9 restart

19
WortelDNSMaster/06.sh Normal file
View File

@ -0,0 +1,19 @@
#!/bin/bash
cat > /etc/bind/named.conf.local <<EOL
zone "f01.com" {
type master;
notify yes;
also-notify { 10.67.3.2; };
allow-transfer { 10.67.3.2; };
file "/etc/bind/Jarkom/f01.com";
};
zone "4.67.10.in-addr.arpa" {
type master;
file "/etc/bind/Jarkom/4.67.10.in-addr.arpa";
};
EOL
service bind9 restart
service bind9 stop