LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   [Slack] Problems with named (https://www.linuxquestions.org/questions/linux-networking-3/%5Bslack%5D-problems-with-named-472232/)

BlackRabbit 08-09-2006 04:04 AM

[Slack] Problems with named
 
Hi,
yesterday I installed Slackware 10.1 on my homeserver. Before that, it was running Slack 9.0. I made a backup of all my config files (apache, samba, php, named, proftpd, ...) and copied them onto the new install. Everything works fine (after some minor adjustments in de config files), except for named.
It's weird actually: named does start without errors (and keeps running), but any local zone I cannot find.
Here are my config files:


/etc/named.conf:
Code:

options {
        directory "/var/named";
        pid-file "/var/run/named/named.pid";
        // Uncommenting this might help if you have to go through a
        // firewall and things are not working out.  But you probably
        // need to talk to your firewall admin.

        // query-source port 53;
};

controls {
        inet 127.0.0.1 allow { localhost; } keys { rndc_key; };
};

key "rndc_key" {
        algorithm hmac-md5;
        secret "KJLZX+44uYN7dTz5QuyKQw==";
};

zone "." IN {
        type hint;
        file "root.hints";
};

zone "0.0.127.in-addr.arpa" IN {
        type master;
        file "pz/127.0.0";
};

zone "maes.local" IN {
        type master;
        notify no;
        file "pz/maes.local";
};

/var/named/pz/maes.local:
Code:

;
; Zone file formaes.local
;
; The full zone file
;
$TTL 3D
@      IN      SOA    sun.maes.local. BlackRabbit.actua-forums.be. (
                        199802151      ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        4W              ; expire, seconds
                        1D )            ; minimum, seconds
;
                NS      ns              ; Inet Address of name server
maes.local.            IN    MX      10 mail.scarlet.be    ; Primary Mail Exchanger
//                MX      20 mail.friend.bogus.  ; Secondary Mail Exchanger
;
localhost      A      127.0.0.1
www            A      192.168.0.2
photos          A      192.168.0.2
cbase          A      192.168.0.2
dvd            A      192.168.0.2
camera1        A      192.168.0.100

/var/named/root.hints:
Code:

; <<>> DiG 9.3.0 <<>> @e.root-servers.net . ns
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 37134
;; flags: qr aa rd; QUERY: 1, ANSWER: 13, AUTHORITY: 0, ADDITIONAL: 13

;; QUESTION SECTION:
;.                              IN      NS

;; ANSWER SECTION:
.                      518400  IN      NS      J.ROOT-SERVERS.NET.
.                      518400  IN      NS      K.ROOT-SERVERS.NET.
.                      518400  IN      NS      L.ROOT-SERVERS.NET.
.                      518400  IN      NS      M.ROOT-SERVERS.NET.
.                      518400  IN      NS      A.ROOT-SERVERS.NET.
.                      518400  IN      NS      B.ROOT-SERVERS.NET.
.                      518400  IN      NS      C.ROOT-SERVERS.NET.
.                      518400  IN      NS      D.ROOT-SERVERS.NET.
.                      518400  IN      NS      E.ROOT-SERVERS.NET.
.                      518400  IN      NS      F.ROOT-SERVERS.NET.
.                      518400  IN      NS      G.ROOT-SERVERS.NET.
.                      518400  IN      NS      H.ROOT-SERVERS.NET.
.                      518400  IN      NS      I.ROOT-SERVERS.NET.

;; ADDITIONAL SECTION:
A.ROOT-SERVERS.NET.    3600000 IN      A      198.41.0.4
B.ROOT-SERVERS.NET.    3600000 IN      A      192.228.79.201
C.ROOT-SERVERS.NET.    3600000 IN      A      192.33.4.12
D.ROOT-SERVERS.NET.    3600000 IN      A      128.8.10.90
E.ROOT-SERVERS.NET.    3600000 IN      A      192.203.230.10
F.ROOT-SERVERS.NET.    3600000 IN      A      192.5.5.241
G.ROOT-SERVERS.NET.    3600000 IN      A      192.112.36.4
H.ROOT-SERVERS.NET.    3600000 IN      A      128.63.2.53
I.ROOT-SERVERS.NET.    3600000 IN      A      192.36.148.17
J.ROOT-SERVERS.NET.    3600000 IN      A      192.58.128.30
K.ROOT-SERVERS.NET.    3600000 IN      A      193.0.14.129
L.ROOT-SERVERS.NET.    3600000 IN      A      198.32.64.12
M.ROOT-SERVERS.NET.    3600000 IN      A      202.12.27.33

;; Query time: 161 msec
;; SERVER: 192.203.230.10#53(e.root-servers.net)
;; WHEN: Tue Aug  8 11:59:32 2006
;; MSG SIZE  rcvd: 436


I also ran "named-checkconf /etc/named.conf", which doesn't return any errors or notices.
Pinging to "www.maes.local" from any machine (client or the server itself) does not work. Pinging to "www.google.com" works from all machines.

More:
named-checkzone -t /var/named/pz/ maes.local maes.local:
Code:

zone maes.local/IN: loaded serial 199802151
OK


dig @localhost www.maes.local:
Code:

; <<>> DiG 9.3.0 <<>> @localhost www.maes.local
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 53728
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.maes.local.                        IN      A

;; Query time: 1 msec
;; SERVER: 127.0.0.1#53(localhost)
;; WHEN: Wed Aug  9 11:18:12 2006
;; MSG SIZE  rcvd: 32

Anybody with an idea?

prozac 08-09-2006 04:40 AM

i would check /var/log/messages for any errors just after starting named.

BlackRabbit 08-09-2006 04:45 AM

Quote:

Originally Posted by prozac
i would check /var/log/messages for any errors just after starting named.

Did that as well, but can't see anything wrong:
Code:

Aug  9 11:43:21 SUN named[1209]: starting BIND 9.3.0
Aug  9 11:43:21 SUN named[1209]: loading configuration from '/etc/named.conf'
Aug  9 11:43:21 SUN named[1209]: no IPv6 interfaces found
Aug  9 11:43:21 SUN named[1209]: listening on IPv4 interface lo, 127.0.0.1#53
Aug  9 11:43:21 SUN named[1209]: listening on IPv4 interface eth0, 192.168.0.2#53
Aug  9 11:43:21 SUN named[1209]: command channel listening on 127.0.0.1#953
Aug  9 11:43:21 SUN named[1209]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1
Aug  9 11:43:21 SUN named[1209]: running
Aug  9 11:43:21 SUN named[1209]: zone 0.0.127.in-addr.arpa/IN: sending notifies (serial 1)


prozac 08-09-2006 04:50 AM

where did it load 'maes.local'?

bathory 08-09-2006 04:52 AM

Quote:

zone 0.0.127.in-addr.arpa/IN: loaded serial 1
Are you sure you're using the correct named.conf? Cause from the logs zone 0.0.127.in-addr.arpa is loaded (which does not exist in the named.conf you posted) and the zone maes.local is not loaded.

BlackRabbit 08-09-2006 05:00 AM

Quote:

Originally Posted by bathory
Are you sure you're using the correct named.conf? Cause from the logs zone 0.0.127.in-addr.arpa is loaded (which does not exist in the named.conf you posted) and the zone maes.local is not loaded.

My bad: didn't copy-paste the whole file.
It does load the correct named.conf (did a search, is the only file on the whole system)
Edited first post.

Quote:

Originally Posted by prozac
where did it load 'maes.local'?

Good question :)

But euhm.. What's wrong then?

prozac 08-09-2006 05:03 AM

your local zone file, maes.local, well i don't see it loading in /var/log/messages. why is it not loading? it you don't load it how would your query fetch data based on the records of that zone.

BlackRabbit 08-09-2006 05:10 AM

Quote:

Originally Posted by prozac
your local zone file, maes.local, well i don't see it loading in /var/log/messages. why is it not loading? it you don't load it how would your query fetch data based on the records of that zone.

Yes ofcourse, I understand that.
What I meant was: what is wrong with my config that it doesn't load the zonefile?

prozac 08-09-2006 05:12 AM

Code:

zone "maes.local" IN {
        type master;
        notify no;
        file "pz/maes.local";
};

well i am not that expert. what does the line in bold does?

prozac 08-09-2006 05:14 AM

also;
Code:

localhost      A      127.0.0.1
www            A      192.168.0.2
photos          A      192.168.0.2
cbase          A      192.168.0.2
dvd            A      192.168.0.2
camera1        A      192.168.0.100

like already said, i am not an expert. shouldn't there be a IN between those www|photos and 192.168.0.2? i don't know actually, maybe someone else knows.

bathory 08-09-2006 05:15 AM

You should add:
Code:

ns            A      192.168.0.2
in your zone file (/var/named/pz/maes.local) cause there is no entry for the host ns, so you cannot find your own dns.

BlackRabbit 08-09-2006 05:18 AM

It notifies other DNS servers of changes (I believe).

Anyway, just to be sure I removed the line and restarted named:
Code:

Aug  9 12:11:01 SUN named[1272]: starting BIND 9.3.0
Aug  9 12:11:01 SUN named[1272]: loading configuration from '/etc/named.conf'
Aug  9 12:11:01 SUN named[1272]: no IPv6 interfaces found
Aug  9 12:11:01 SUN named[1272]: listening on IPv4 interface lo, 127.0.0.1#53
Aug  9 12:11:01 SUN named[1272]: listening on IPv4 interface eth0, 192.168.0.2#53
Aug  9 12:11:01 SUN named[1272]: command channel listening on 127.0.0.1#953
Aug  9 12:11:01 SUN named[1272]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1
Aug  9 12:11:01 SUN named[1272]: running
Aug  9 12:11:01 SUN named[1272]: zone 0.0.127.in-addr.arpa/IN: sending notifies (serial 1)

It doesn't load nor notify maes.local



Quote:

Originally Posted by bathory
You should add:
Code:

ns            A      192.168.0.2
in your zone file (/var/named/pz/maes.local) cause there is no entry for the host ns, so you cannot find your own dns.

You mean like this:
Code:

;
; Zone file formaes.local
;
; The full zone file
;
$TTL 3D
@      IN      SOA    sun.maes.local. BlackRabbit.actua-forums.be. (
                        199802151      ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        4W              ; expire, seconds
                        1D )            ; minimum, seconds
;
        IN        NS    ns              ; Inet Address of name server
maes.local.            IN    MX      10 mail.scarlet.be    ; Primary Mail Exchanger
//                MX      20 mail.friend.bogus.  ; Secondary Mail Exchanger
;
ns            A      192.168.0.2
localhost      A      127.0.0.1
www            A      192.168.0.2
photos          A      192.168.0.2
cbase          A      192.168.0.2
dvd            A      192.168.0.2
camera1        A      192.168.0.100

Doesn't work either :(

BlackRabbit 08-09-2006 05:29 AM

Quote:

Originally Posted by prozac
also;
Code:

localhost      A      127.0.0.1
www            A      192.168.0.2
photos          A      192.168.0.2
cbase          A      192.168.0.2
dvd            A      192.168.0.2
camera1        A      192.168.0.100

like already said, i am not an expert. shouldn't there be a IN between those www|photos and 192.168.0.2? i don't know actually, maybe someone else knows.

Wasn't on previous install (as that worked).
Anyway, checked google, seems others add "IN" as well, so did it as well now.
Unfortunately it didn't make a difference :(

BlackRabbit 08-09-2006 05:36 AM

More information:
maes.local isn't the only domain I'm running on this server. Another domain on it is datanuke.be:
/var/named/datanuke.be
Code:

;
; Zone file for datanuke.be
;
; The full zone file
;
$TTL 3D
@      IN      SOA    sun.datanuke.be. BlackRabbit.actua-forums.be. (
                        199802151      ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        4W              ; expire, seconds
                        1D )            ; minimum, seconds
;
                NS      ns              ; Inet Address of name server
//                MX      10 mail.linux.bogus    ; Primary Mail Exchanger
//                MX      20 mail.friend.bogus.  ; Secondary Mail Exchanger
;
localhost      A      127.0.0.1
www            A      213.193.229.20
2x              A      192.168.0.2
ftp            A      192.168.0.3

www.datanuke.be is a public website. All the others are sites on my local servers (for developement etc).

Although I can ping www.google.com on the servermachine (public IP), I fail to reach www.datanuke.be. This is interesting, because it means that named does "pick up" the request, but is unable to handle it.

My guess is the problem lies in the zone-files..

prozac 08-09-2006 05:36 AM

Quote:

zone "maes.local" IN {
type master;
notify no;
file "pz/maes.local";
};
in my understanding, bind should look for maes.local and try to load it (even if it has errors), but since it isn't even trying, i feel it is not using the named.conf you have configured.


All times are GMT -5. The time now is 06:52 PM.