Помогите, пожалуйста, правильно написать конфиг bind.
Я не могу заставить работать reverse lookup, dig 192.168.0.2 пишет NXDOMAIN. В прямую сторону поиск работает нормально.
named.conf сейчас выглядит так:
---
acl "trusted-subnet" { 192.168.1.0/24; 127/8; };
options {
directory "/var/named";
};
controls {
inet 127.0.0.1 allow { localhost; } keys { rndckey; };
};
view "internal" { // What the home network will see
match-clients { localnets; localhost; "trusted-subnet"; };
zone "." IN {
type hint;
file "named.ca";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
//zone "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa" IN {
// type master;
// file "ip6.local.zone";
// allow-update { none; };
//};
//zone "255.in-addr.arpa" IN {
// type master;
// file "named.broadcast";
// allow-update { none; };
//};
//zone "0.in-addr.arpa" IN {
// type master;
// file "named.zero";
// allow-update { none; };
//};
zone "1.168.192.in-addr.arpa" IN {
type master;
file "192-168-1.zone";
allow-update { none; };
};
zone "mydomain.ru" {
type master;
notify no;
file "mydomain.ru.local.zone";
allow-query { any; };
};
};
view "external" {
match-clients { any; };
recursion no;
zone "mydomain.ru" {
type master;
notify no;
file "mydomain.ru.zone";
allow-query { any; };
};
};
include "/etc/rndc.key";
logging {
channel default_log {
file "/var/log/dns.log";
severity notice;
print-time yes;
print-category yes;
print-severity yes;
};
channel more_log {
file "/var/log/dns_more.log";
severity notice;
print-time yes;
print-category yes;
print-severity yes;
};
category queries { default_log;};
category xfer-in { default_log; };
category xfer-out { default_log; };
category security { more_log; };
category resolver { more_log; };
category client { more_log; };
category unmatched { more_log; };
category default { more_log; };
category database { more_log; };
};
---
а 192-168-1.zone - так:
---
$ORIGIN .
$TTL 3h
1.168.192.in-addr.arpa. IN SOA ns1.mydomain.ru. admin.mydomain.ru. (
20050104
3h
1h
1w
1h )
IN NS mydomain.ru.
$ORIGIN 1.168.192.in-addr.arpa.
;2 IN MX mail.mydomain.ru.
2 IN PTR ns1.mydomain.ru.
2 IN PTR m1.mydomain.ru.
2 IN PTR www.mydomain.ru.
2 IN PTR ftp.mydomain.ru.
2 IN PTR mail.mydomain.ru.
1 IN PTR gate.mydomain.ru.
3 IN PTR m2.mydomain.ru.
---