BIND

Обсуждение настройки и работы сервисов, резервирования, сетевых настроек и вопросов безопасности ОС.

Модераторы: SLEDopit, Модераторы разделов

Patrick
Сообщения: 10

BIND

Сообщение Patrick »

Пытаюсь настроить bind, на серваке вот по этому руководству http://system-administrators.info/?p=1798.

В итоге после

Код: Выделить всё

nslookup example.com 127.0.0.1


example.com - именя моего домена
127.0.0.1 - ip сервера

получаю

Код: Выделить всё

Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find example.com: NXDOMAIN


в чём может быть ошибка?

Заранее благодарен.
Спасибо сказали:
skor
Сообщения: 419
ОС: RTFM-OS v127.0.0.1

Re: BIND

Сообщение skor »

Patrick писал(а): ↑
19.09.2008 11:49
в чём может быть ошибка?
Ошибка в том что неправильно настроен DNS-сервер....
Какой вопрос - такой ответ
Для более подробного ответа надо более подробные сведения.
Ждем конфигов и логов.
Спасибо сказали:
Patrick
Сообщения: 10

Re: BIND

Сообщение Patrick »

Собственно лог:

Код: Выделить всё

Sep 18 21:11:27 example named[25755]: loading configuration from '/etc/bind/named.conf'
Sep 18 21:11:27 example named[25755]: zone example.ru/IN: loading from master file example.ru` failed: file not found
Sep 18 21:13:44 example named[25755]: shutting down: flushing changes
Sep 18 21:13:44 example named[25755]: stopping command channel on 127.0.0.1#953
Sep 18 21:13:44 example named[25755]: stopping command channel on ::1#953
Sep 18 21:13:44 example named[25755]: no longer listening on ::#53
Sep 18 21:13:44 example named[25755]: no longer listening on 127.0.0.1#53
Sep 18 21:13:44 example named[25755]: no longer listening on 92.63.101.249#53
Sep 18 21:13:45 example named[25755]: exiting
Sep 18 21:13:47 example named[26326]: starting BIND 9.4.2 -u bind -t /var/lib/named
Sep 18 21:13:47 example named[26326]: found 1 CPU, using 1 worker thread
Sep 18 21:13:47 example named[26326]: loading configuration from '/etc/bind/named.conf'
Sep 18 21:13:47 example named[26326]: listening on IPv6 interfaces, port 53
Sep 18 21:13:47 example named[26326]: listening on IPv4 interface lo, 127.0.0.1#53
Sep 18 21:13:47 example named[26326]: listening on IPv4 interface venet0:0, 92.63.101.249#53
Sep 18 21:13:47 example named[26326]: automatic empty zone: 254.169.IN-ADDR.ARPA
Sep 18 21:13:48 example named[26326]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Sep 18 21:13:48 example named[26326]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Sep 18 21:13:48 example named[26326]: automatic empty 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.0.IP6.ARPA
Sep 18 21:13:48 example named[26326]: automatic empty zone: 1.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
Sep 18 21:13:48 example named[26326]: automatic empty zone: D.F.IP6.ARPA
Sep 18 21:13:48 example named[26326]: automatic empty zone: 8.E.F.IP6.ARPA
Sep 18 21:13:48 example named[26326]: automatic empty zone: 9.E.F.IP6.ARPA
Sep 18 21:13:48 example named[26326]: automatic empty zone: A.E.F.IP6.ARPA
Sep 18 21:13:48 example named[26326]: automatic empty zone: B.E.F.IP6.ARPA
Sep 18 21:13:48 example named[26326]: command channel listening on 127.0.0.1#953
Sep 18 21:13:48 example named[26326]: command channel listening on ::1#953
Sep 18 21:13:48 example named[26326]: zone 0.in-addr.arpa/IN: loaded serial 1
Sep 18 21:13:48 example named[26326]: zone 127.in-addr.arpa/IN: loaded serial 1
Sep 18 21:13:48 example named[26326]: zone 255.in-addr.arpa/IN: loaded serial 1
Sep 18 21:13:48 example named[26326]: zone localhost/IN: loaded serial 2
Sep 18 21:13:48 example named[26326]: zone example.ru/IN: loading from master file example.ru` failed: file not found
Sep 18 21:13:48 example named[26326]: running
Sep 18 21:14:40 example named[26326]: loading configuration from '/etc/bind/named.conf'
Sep 18 21:14:40 example named[26326]: zone example.ru/IN: loading from master file example.ru` failed: file not found
Sep 18 21:16:30 example named[26326]: loading configuration from '/etc/bind/named.conf'
Sep 18 21:16:30 example named[26326]: zone example.ru/IN: loading from master file example.ru` failed: file not found


named.conf

Код: Выделить всё

// This is the primary configuration file for the BIND DNS server named.
//
// Please read /usr/share/doc/bind9/README.Debian.gz for information on the
// structure of BIND configuration files in Debian, *BEFORE* you customize
// this configuration file.
//
// If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";

// prime the server with knowledge of the root servers
zone "." {
        type hint;
        file "/etc/bind/db.root";
};

// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912

zone "localhost" {
        type master;
        file "/etc/bind/db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "/etc/bind/db.127";
};

zone "0.in-addr.arpa" {
        type master;
        file "/etc/bind/db.0";
};

zone "255.in-addr.arpa" {
        type master;
        file "/etc/bind/db.255";
};

include "/etc/bind/named.conf.local";
include "/etc/bind/myzones.conf";


myzones.conf

Код: Выделить всё

zone "example.ru" {
type master;
file "example.ru`";
};


example.ru

Код: Выделить всё

$ORIGIN example.ru
$TTL    3600
example.ru.          IN      SOA     ns1.firstvds.ru. root.example.ru. (2008090201 10800 3600 604800 86400)
example.ru.          IN      NS       ns1.firstvds.ru.
example.ru.          IN      NS       ns2.firstvds.ru.
example.ru.          IN      A       92.63.101.249
www     IN      CNAME         example.ru.

всё остальное не менял...
Спасибо сказали:
skor
Сообщения: 419
ОС: RTFM-OS v127.0.0.1

Re: BIND

Сообщение skor »

Sep 18 21:13:48 example named[26326]: zone example.ru/IN: loading from master file example.ru` failed: file not found

Не находит файл, разбирайтесь почему.
Спасибо сказали:
User07
Сообщения: 184

Re: BIND

Сообщение User07 »

у вас что example.ru или example.com?
Спасибо сказали:
User07
Сообщения: 184

Re: BIND

Сообщение User07 »

всё! разобрался! зону нужно конкретно прописать в named.conf а не инклюды!

вот мой named.conf

Код: Выделить всё

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; };
};

[b]zone "bind.com" {
        type master;
        file "/etc/bind.com";
        allow-update { none; };
        allow-query { any; };
        notify yes;[/b]

и всё заработало

Код: Выделить всё

[root@localhost etc]# nslookup bind.com 127.0.0.1
Server:         127.0.0.1
Address:        127.0.0.1#53

Name:   bind.com
Address: 192.168.0.1
Спасибо сказали:
User07
Сообщения: 184

Re: BIND

Сообщение User07 »

только почему-то бинд работает, только тогда, когда я его запущу от рута. А как сделать, чтобы он стартовал и из под юзера, сразу после входа в систему???
Спасибо сказали:
User07
Сообщения: 184

Re: BIND

Сообщение User07 »

разобрался
Спасибо сказали: