Здравствуйте!
Нужна помощь по настройке бинда. Парюсь уже три недели, а днс не запускается. Посмотрите пожалуйста конфиги. Вот всё, что я делал по пунктам:1) Перечислил две свои зоны и указал адрес прослушки.
Файл /etc/named.conf
// (oe) Loosely based on the document below and from production server configurations.
// http://www.cymru.com/Documents/secure-bind-template.html
//
// $Id: named.conf 80849 2007-09-06 11:56:48Z oden $
// $HeadURL: svn+ssh://svn.mandriva.com/svn/packages/cooker/bind/current/SOURCES/named.conf $
// secret must be the same as in /etc/rndc.conf
// Access lists (ACL's) should be defined here
include "/etc/bogon_acl.conf";
include "/etc/trusted_networks_acl.conf";
// Define logging channels
include "/etc/logging.conf";
options {
version "";
directory "/var/named";
dump-file "/var/tmp/named_dump.db";
pid-file "/var/run/named.pid";
statistics-file "/var/tmp/named.stats";
zone-statistics yes;
// datasize 256M;
coresize 100M;
// fetch-glue no;
// recursion no;
// recursive-clients 10000;
auth-nxdomain yes;
query-source address * port *;
listen-on port 53 { 192.168.1.100; };
cleaning-interval 120;
transfers-in 20;
transfers-per-ns 2;
lame-ttl 0;
max-ncache-ttl 10800;
// forwarders { first_public_nameserver_ip; second_public_nameserver_ip; };
allow-update { none; };
allow-transfer { any; };
// Prevent DoS attacks by generating bogus zone transfer
// requests. This will result in slower updates to the
// slave servers (e.g. they will await the poll interval
// before checking for updates).
// notify no;
// notify explicit;
// also-notify { secondary_name_server };
// Generate more efficient zone transfers. This will place
// multiple DNS records in a DNS message, instead of one per
// DNS message.
transfer-format many-answers;
// Set the maximum zone transfer time to something more
// reasonable. In this case, we state that any zone transfer
// that takes longer than 60 minutes is unlikely to ever
// complete. WARNING: If you have very large zone files,
// adjust this to fit your requirements.
max-transfer-time-in 60;
// We have no dynamic interfaces, so BIND shouldn't need to
// poll for interface state {UP|DOWN}.
interface-interval 0;
// Uncoment these to enable IPv6 connections support
// IPv4 will still work
// listen-on { none; };
// listen-on-v6 { any; };
allow-query { trusted_networks; };
allow-recursion { trusted_networks; };
// Deny anything from the bogon networks as
// detailed in the "bogon" ACL.
blackhole { bogon; };
};
// workaround stupid stuff... (OE: Wed 17 Sep 2003)
zone "ac" { type delegation-only; };
zone "cc" { type delegation-only; };
zone "com" { type delegation-only; };
zone "cx" { type delegation-only; };
zone "lv" { type delegation-only; };
zone "museum" { type delegation-only; };
zone "net" { type delegation-only; };
zone "nu" { type delegation-only; };
zone "ph" { type delegation-only; };
zone "sh" { type delegation-only; };
zone "tm" { type delegation-only; };
zone "ws" { type delegation-only; };
zone "." IN {
type hint;
file "named.ca";
};
zone "localdomain" IN {
type master;
file "master/localdomain.zone";
allow-update { none; };
};
zone "localhost" IN {
type master;
file "master/localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "reverse/named.local";
allow-update { none; };
};
zone "hotmail.com" IN {
type master;
file "hotmail.com";
};
zone "192.168.1" IN {
type master;
file "192.168.1";
};
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 "reverse/named.ip6.local";
allow-update { none; };
};
zone "255.in-addr.arpa" IN {
type master;
file "reverse/named.broadcast";
allow-update { none; };
};
zone "0.in-addr.arpa" IN {
type master;
file "reverse/named.zero";
allow-update { none; };
};
Затем создал следующие файлы:
/etc/trusted_network_acl.conf
acl "trusted" {
192.168.1/24;
localhost;
};
/etc/bogon_acl.conf
acl "bogon" {
10.129.1.1/8;
};
/etc/logging.conf
acl "trusted_networks" {
192.168.1/24;
localhost;
};
logging {
channel bind_log {
file "/var/log/named/named.log";
print-time yes;
print-category yes;
print-severity yes;
};
channel update_debug {
file "/var/log/named/update-debug.log";
severity debug 3;
print-time yes;
print-category yes;
print-severity yes;
};
channel security_info {
file "/var/log/named/security-info.log";
severity info;
print-time yes;
print-category yes;
print-severity yes;
};
category default { bind_log;};
category xfer-in { bind_log;};
category xfer-out { bind_log;};
category update { update_debug;};
category security { security_info;};
};
После этого запустил отладочную комманду named-checkconf, которая наконец то не выдала ни каких ошибок или предупреждений.
2) Создал два файла описания зон:
/var/named/hotmail.com
$TTL 86400
@ IN SOA ns.hotmail.com. admin.hotmail.com. (
2009040301
10800
3600
3600000
86400 )
IN NS ns.hotmail.com.
ns IN A 192.168.1.100
Запустил комманду named-checkzone hotmail.com /var/named/hotmail.com
Получил ответ:
zone hotmail.com/IN: loaded serial 2009040301
OK
/var/named/192.168.1
$TTL 86400
@ IN SOA ns.hotmail.com. admin.hotmail.com. (
2009040301
10800
3600
3600000
86400
)
IN NS ns.hotmail.com.
100 IN PTR ns.hotmail.com.
Запустил комманду named-checkzone 1.168.192.in-addr.arpa /var/named/192.168.1
Получил ответ:
zone 1.168.192.in-addr.arpa/IN: loaded serial 2009040301
OK
3) Указал айпишник своей сетевой карты:
/etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.1.100
4) Запустил комманду Dig:
dig @192.168.1.100 hotmail.com
; <<>> DiG 9.5.0-P2 <<>> @192.168.1.100 hotmail.com
; (1 server found)
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 23828
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;hotmail.com. IN A
;; Query time: 1 msec
;; SERVER: 192.168.1.100#53(192.168.1.100)
;; WHEN: Wed May 20 14:34:28 2009
;; MSG SIZE rcvd: 29
Статус по прежнему остался SERVFAIL. В resolv.conf записывал и адрес 127.0.0.1 так же указывая его в Listen on port 53. Результат тот же. В чём же дело? Может ли бинд стартовать, если я не создал вторичный днс?
P.S. В файлах зон счётчик увеличил на 01 и выполнил команду service named reload. Толку - никакого.