Имеется Bind 9 на Centos 7
eth0 192.168.0.105
eth1 192.168.56.106
Задача 1: при nslookup example.com 192.168.56.106 отдать ип указаный в файле зоны 192.168.56.234 это у меня получается
Задача 2: при nslookup example.com 192.168.0.105 отдать ип указаный в файле зоны 192.168.0.123 это не получается пишет
** server can’t find example.com: NXDOMAIN
/etc/named.conf
acl "trusted" { 192.168.56.105; }; #slave
acl "local" { 192.168.56.0/24; };
acl "external" { 192.168.0.0/24; };
options {
listen-on port 53 { 127.0.0.1; 192.168.56.106; 192.168.0.105; };
listen-on-v6 port 53 { none; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
allow-query { 127.0.0.1; 192.168.56.0/24; 192.168.0.0/24; };
allow-transfer {192.168.56.105;};
recursion yes;
allow-recursion { 127.0.0.1; 192.168.56.0/24; 192.168.0.0/24; };
forwarders { 192.168.0.1; };
version "DNS Server";
managed-keys-directory "/var/named/dynamic";
pid-file "/run/named/named.pid";
session-keyfile "/run/named/session.key";
dnssec-enable no;
dnssec-validation no;
};
view "local" {
match-clients {"local";};
zone "example.com" IN {
type master;
file "example.com.zone";
allow-transfer { 192.168.56.105; };
allow-update { 192.168.56.105; };
also-notify { 192.168.56.105; };
notify yes;
};
zone "example.net" IN {
type master;
file "example.net.zone";
allow-transfer { 192.168.56.105; };
also-notify { 192.168.56.105; };
};
};
view "external" {
match-clients { "any"; };
zone "example.com" IN {
type master;
file "example.com.ex.zone";
};
zone "example.net" IN {
type master;
file "example.net.ex.zone";
};
};
#include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";
};
example.com.zone
$TTL 86400
@ IN SOA example.com. example.com.local. (
2
60
120
2419200
2592000 )
@ IN NS example.com.
@ IN A 192.168.56.234
@ IN TXT "my_domain lalalalalalala"
ns1 IN A 192.168.56.106
ns2 IN A 192.168.56.105
www IN CNAME @
example.com.ex.zone
$TTL 86400
@ IN SOA example.com. example.com.local. (
2
60
120
2419200
2592000 )
@ IN NS example.com.
@ IN A 192.168.0.123
@ IN TXT "example.com - external"
ns1 IN A 192.168.0.105
www IN CNAME @