# vi /etc/bind/named.conf.options options {
directory "/var/cache/bind"; listen-on { 192.168.X.1; 127.0.0.1; };
max-cache-size
10m; forwarders {
8.8.8.8; }; allow-query { 192.168.X/24; 127.0.0.1;
};
allow-transfer {
192.168.X/24; 127.0.0.1;
};
dnssec-validation auto;
auth-nxdomain no; # conform to RFC1035
};
Endi konfiguratsiyani xatolar uchun tekshirishingiz mumkin va agar xatolar bo'lmasa, dns serverini qayta ishga tushiring. Bundan tashqari, agar ressolv.conf faylini o'zgartirmagan bo'lsangiz, uni yaratishingiz mumkin.
# named-checkconf # systemctl restart bind9 named.conf.local konfiguratsiya fayliga oldinga va teskari zonalar haqida ma'lumot qo'shing, shundan keyin quyidagilarni yaratamiz.
# vi /etc/bind/named.conf.local zone
"exampleX.com" { type master;
file
"/var/lib/bind/db.exampleX.com"; allowupdate { key rndc-key; };
};
zone "X.168.192.in-addr.arpa" { type
master;
file
"/var/lib/bind/db.192.168.X"; allowupdate { key rndc-key; }; };
15. Keyingi qadam to'g'ridan -to'g'ri zonani yaratishdir:
# vi /var/lib/bind/db.exampleX.com
$TTL 604800 ; 1 week
@ IN SOA exampleX.com. root.exampleX.com. (
2020052201 ; serial
604800
; refresh (1 week)
86400
; retry (1 day)
2419200
; expire (4 weeks)
604800
)
; minimum (1 week)
@ IN NS gw.exampleX.com.
@ IN A 192.168.X.1 gw IN A 192.168.X.1 server
IN A 192.168.X.2 user IN A 192.168.X.100
16. Teskari zonani yarating