Страница 1 из 1

named

Добавлено: 2012-12-15 17:22:32
harmless
Доброе время суток всем!
Имеется

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

#uname -r
9.0-RELEASE-p4

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

#named -v
BIND 9.9.2-P1
и такие 4 зоны

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

#cat /etc/namedb/master/localhost
$ORIGIN .

$TTL    3600

localhost       SOA     localhost.      root.localhost. (
                        2012121502      ; Serial
                        3600            ; Refresh
                        900             ; Retry
                        3600000         ; Expire
                        3600 )          ; Minimum
                NS      ns
                A       127.0.0.1

$ORIGIN localhost.
localhost       A       127.0.0.1
serverok        A       127.0.0.1
ns              A       127.0.0.1

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

#cat /etc/namedb/master/localhost.rev
$ORIGIN .

$TTL    3600

127.in-addr.arpa        SOA     localhost.      root.localhost.  (
                                2012121502      ; Serial
                                3600            ; Refresh
                                900             ; Retry
                                3600000         ; Expire
                                3600 )          ; Minimum
                        NS      ns.localhost.
$ORIGIN 0.0.127.in-addr.arpa.
1                       PTR     localhost.
                        PTR     localhost.bc-gold.org.ua.
                        PTR     ns.localhost.

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

#cat /etc/namedb/master/local
$ORIGIN .

$TTL 3600

local                   SOA     local. root.local. (
                                2012121501 ; serial
                                3600       ; refresh (1 hour)
                                900        ; retry (15 minutes)
                                3600000    ; expire (5 weeks 6 days 16 hours)
                                3600 )     ; minimum (1 hour)
                        NS      ns
                        NS      ns2
                        MX      10 mx
                        A       10.0.0.1

$ORIGIN local.
www                     A       10.0.0.1
web                     CNAME   10.0.0.1
administrative          A       10.0.0.1
billing                 A       10.0.0.1
ftp                     A       10.0.0.1
localhost               A       127.0.0.1
mail                    A       10.0.0.1
mx                      A       10.0.0.1
ns                      A       10.0.0.1
ns2                     A       10.0.0.2
proma                   A       10.0.0.1
radio                   A       10.0.0.2
samba                   A       10.0.0.3
ntp                     A       10.0.0.1
ntp2                    A       10.0.0.3
serverok                A       10.0.0.1
teamspeak               A       10.0.0.4
teamspeak3              A       10.0.0.4
ts                      A       10.0.0.4
ts3                     A       10.0.0.4

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

#cat /etc/namedb/master/1.0.0.10.rev
$ORIGIN .

$TTL 3600       ; 1 hour

0.0.10.in-addr.arpa     SOA     local. root.local. (
                                2012121501 ; serial
                                3600       ; refresh (1 hour)
                                900        ; retry (15 minutes)
                                3600000    ; expire (5 weeks 6 days 16 hours)
                                3600       ; minimum (1 hour)
                                )
                        NS      ns.local.
                        NS      ns2.local.

$ORIGIN 0.0.10.in-addr.arpa.
1                       PTR     local.
                        PTR     homelan.bc-gold.org.ua.
                        PTR     serverok.local.
                        PTR     ntp.local.
                        PTR     www.local.
                        PTR     web.local.
2                       PTR     ns2.local.
                        PTR     radio.local.
                        PTR     radio.bc-gold.org.ua.
3                       PTR     samba.local.
                        PTR     ntp2.local.
4                       PTR     ts.local.
                        PTR     ts3.local.
                        PTR     teamspeak.local.
                        PTR     teamspeak3.local.

И почему-то при данных конфигах зона local НЕ РАБОТАЕТ :st:
#nslookup localhost
Server: 127.0.0.1
Address: 127.0.0.1#53

Name: localhost
Address: 127.0.0.1

#nslookup 127.0.0.1
Server: 127.0.0.1
Address: 127.0.0.1#53

1.0.0.127.in-addr.arpa name = localhost.
1.0.0.127.in-addr.arpa name = ns.localhost.

#nslookup 10.0.0.1
Server: 127.0.0.1
Address: 127.0.0.1#53

** server can't find 1.0.0.10.in-addr.arpa: SERVFAIL

#nslookup local
Server: 127.0.0.1
Address: 127.0.0.1#53

** server can't find local: SERVFAIL
[/code]
Может что-то не так в файлах зон?
Ткните носом, потому что я уже запарился

Re: named

Добавлено: 2012-12-16 2:46:22
harmless
Че за куйня не могу понять

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

#cat /etc/namedb/master/local
$ORIGIN .
$TTL 3600
local   SOA     local. root.local. (
                2012121601
                3600
                900
                3600000
                3600)
                NS      ns.local.
                NS      ns2.local.
                MX 10   mx.local.
                A       10.0.0.1
$ORIGIN local.
ns              A       10.0.0.1
ns2             A       10.0.0.2
mx              A       10.0.0.1
localhost       A       127.0.0.1
samba           A       10.0.0.3

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

#named-checkzone local /etc/namedb/master/local
zone local/IN: loaded serial 2012121601
OK
И при всем этом

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

#nslookup samba.local.
Server:         127.0.0.1
Address:        127.0.0.1#53

** server can't find samba.local: SERVFAIL

Re: named

Добавлено: 2012-12-16 21:19:03
GRooVE
а где сам конфиг named'а?

Re: named

Добавлено: 2012-12-17 0:55:25
harmless
GRooVE писал(а):а где сам конфиг named'а?
Конфиг мой не спасет ситуацию, так как там еще куча зон которые работают....
Но могу привести

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

#cat /etc/namedb/named.conf
key "rndc-key" {
       algorithm hmac-md5;
       secret "****************************";
};

key DHCP_UPDATER {
        algorithm hmac-md5;
        secret "***************************";
};

acl localnetwork {
        10.0.0.0/24;
};

controls {
        inet 127.0.0.1 port 953
        allow { 127.0.0.1; } keys { "rndc-key"; };
};

logging {
        channel syslog {
            syslog              daemon;
            severity            debug;
            print-category      yes;
            print-severity      yes;
        };
        channel update_debug {
                file            "/var/log/named-update.log";
                severity        debug 3;
                print-category  yes;
                print-severity  yes;
                print-time      yes;
        };
        channel security_info    {
                file            "/var/log/named-auth.log";
                severity        info;
                print-category  yes;
                print-severity  yes;
                print-time      yes;
        };
        category update { update_debug; };
        category security { security_info; };
        category xfer-in { syslog; };
        category xfer-out { syslog; };
        category config { syslog; };
        category default { null; };
};

options {
        directory       "/etc/namedb";
        pid-file        "/var/run/named/pid";
        dump-file       "/var/dump/named_dump.db";
        statistics-file "/var/stats/named.stats";
        listen-on       { 127.0.0.1; 10.0.0.1; };
        disable-empty-zone "255.255.255.255.IN-ADDR.ARPA";
        disable-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";
        disable-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";
};

zone "." {
        type hint;
        file "named.root";
};

include "configs/localhost.conf";
include "configs/local.conf";
include "configs/bl.local.conf";
include "configs/harmless.org.ua.conf";
include "configs/0.0.10.in-addr.arpa.conf";
Содержимое одного из инклудов

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

#cat /etc/namedb/configs/harmless.org.ua.conf
// зона harmless.org.ua
zone "harmless.org.ua" {
        type master;
        file "master/harmless.org.ua";
};


Re: named

Добавлено: 2012-12-17 1:37:52
harmless
Решение нашел
Просто нужно было удалить файлы журналов намеда по этим зонам и перегрузить демона.