add for DNS comment

This commit is contained in:
Maxim Khomutov 2022-04-22 19:10:03 +03:00
parent d9f52411a9
commit 8174169362
2 changed files with 5 additions and 24 deletions

View File

@ -25,30 +25,8 @@ nmcli con add con-name ens192 ifname ens192 autoconnect yes type ethernet ip4 "1
nmcli con mod ens192 +ipv4.dns 172.16.20.10 +ipv4.dns 192.168.20.10 +ipv4.dns-search "skill39.wsr" nmcli con mod ens192 +ipv4.dns 172.16.20.10 +ipv4.dns 192.168.20.10 +ipv4.dns-search "skill39.wsr"
nmcli con up ens192 ifname ens192 nmcli con up ens192 ifname ens192
NMCO="/etc/bind/named.conf.options" # Prinamry DNS
rm $NMCO; touch $NMCO; chown -R bind:bind $NMCO # Do it by you self
echo -e "// /etc/bind/named.conf.options file\noptions {\n\tdirectory \"/var/cache/bind\";\n\tforwarders { 10.10.10.10; };\n\tdnssec-validation no;\n\tlisten-on-v6 { none; };\n\trecursion yes;\n};" >> $NMCO
mkdir /opt/dns
cp /etc/bind/db.local /opt/dns/skill39.db
cp /etc/bind/db.127 /opt/dns/db.172
cp /etc/bind/db.127 /opt/dns/db.192
chown -R bind:bind /opt/dns
sed -ie "s/^}$/\n\n # skill39 zones\n \/opt\/dns\/** rw,\n}/" /etc/apparmor.d/usr.sbin.named
echo -e "
zone \"skill39.wsr\" {\n\ttype master;\n\tallow-transfer { any; };\n\tallow-update { 172.16.50.2; };\n\tfile \"/opt/dns/skill39.db\";\n};
zone \"16.172.in-addr.arpa\" { \n\ttype master; \n\tallow-transfer { any; };\n\tallow-update { 172.16.50.2; };\n\tfile \"/opt/dns/db.172\";};
zone \"168.192.in-addr.arpa\" {\n\ttype master; \n\tallow-transfer { any; }; \n\tfile \"/opt/dns/db.192\";\n};" >> /etc/bind/named.conf.default-zones
nano /opt/dns/skill39.db
# ( -opt-dns )
nano /opt/dns/db.172
# ( -opt-dns )
nano /opt/dns/db.192
# ( -opt-dns )
systemctl disable chronyd ; systemctl stop chronyd systemctl disable chronyd ; systemctl stop chronyd
shutdown -r 0 shutdown -r 0

View File

@ -33,6 +33,9 @@ nmcli con add con-name ens160 ifname ens160 autoconnect yes type ethernet ip4 19
nmcli con mod ens160 +ipv4.dns 172.16.20.10 +ipv4.dns 192.168.20.10 +ipv4.dns-search "skill39.wsr" nmcli con mod ens160 +ipv4.dns 172.16.20.10 +ipv4.dns 192.168.20.10 +ipv4.dns-search "skill39.wsr"
nmcli con up ens160 ifname ens160 nmcli con up ens160 ifname ens160
# Secondary DNS
# Do it by you self
systemctl disable chronyd ; systemctl stop chronyd systemctl disable chronyd ; systemctl stop chronyd
shutdown -r 0 shutdown -r 0