Local named server(without internet).
Bind Listen on interfaces:
lo(127.0.0.1), vlan43(192.168.43.1), vlan41(192.168.41.1)
from a neighboring device(192.168.43.77) comes A request to the DNS server(192.168.43.1):
SERVER22: type A, class IN
In the query does not specify a search zone…
How to configure bind server to look for this requested hostname in the myzone.org
?
Problem resolved:
I used “view” and created Privet Root Zone for this “view”.
for example:
vi /etc/named.conf
and add this:
acl amytestacl {
192.168.143.111/32; 192.168.143.116/32; 10.0.17.13/32;
};
view "amytestview" {
match-clients { amytestacl; };
zone "." in {
type master;
file "root8765.zone";
};
};
cat /var/named/root8765.zone
@ 1D IN SOA localhost. root.localhost. (
20221022130500 ;
3H ;
15M ;
1W ;
1D ) ;
1D IN NS localhost.
localhost. 1D IN A 127.0.0.1
tratata432 1D IN A 192.168.143.110
Attention !!!:
- all other zones must be placed in a separate viewer
example:
view "dall" {
match-clients { any; };
zone "." IN {
type hint;
file "named.ca";
};
zone "myoffice.ua" IN {
// allow-transfer { any; };
allow-transfer { 172.8.21.4; 192.168.121.8;};
also-notify { 172.8.21.4; 192.168.121.8; };
file "forward.myoffice.ua";
.......
};
2) viewer "amytestview" must be before the viewer "dall" in the /etc/named.conf file !