Author Topic: DNS Server no worky  (Read 2532 times)

turbomettwurst

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
DNS Server no worky
« on: August 27, 2008, 05:52:05 pm »
Hi folks, i assume my problem is somewhat similar to http://forum.eboxplatform.com/index.php?topic=541.0
but i didn't want to hijack his thread, so here is my own. If you want to, you may merge it.

Currently my DNS Server does not work at all.

It's running and listening on all available interfaces

Code: [Select]
root@destiny:/etc/bind# netstat -aln | grep 53
tcp        0      0 10.10.10.1:53           0.0.0.0:*               LISTEN     
tcp        0      0 192.168.0.252:53        0.0.0.0:*               LISTEN     
tcp        0      0 127.0.0.1:53            0.0.0.0:*               LISTEN     

my resolv.conf is rather simple
Code: [Select]
root@destiny:/etc/bind# cat /etc/resolv.conf
nameserver 192.168.0.252

so is my hostsfile:
Code: [Select]
root@destiny:/etc/bind# cat /etc/hosts
127.0.0.1       localhost
192.168.0.252   destiny.mymk.local destiny

my named.conf.local has two zones
Code: [Select]
root@destiny:/etc/bind# cat named.conf.local
//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
//include "/etc/bind/zones.rfc1918";

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

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

and the zonefiles are in place
Code: [Select]
root@destiny:/etc/bind# ls -al
total 60
drwxr-sr-x   2 root bind 4096 2008-08-27 13:01 .
drwxr-xr-x 106 root root 4096 2008-08-27 17:37 ..
-rw-r--r--   1 root root  237 2008-07-07 23:08 db.0
-rw-r--r--   1 root root  281 2008-08-27 17:32 db.0.168.192
-rw-r--r--   1 root root  271 2008-07-07 23:08 db.127
-rw-r--r--   1 root root  237 2008-07-07 23:08 db.255
-rw-r--r--   1 root root  353 2008-07-07 23:08 db.empty
-rw-r--r--   1 root root  270 2008-07-07 23:08 db.local
-rw-r--r--   1 root root  285 2008-08-27 17:32 db.mymk.local
-rw-r--r--   1 root root 2878 2008-07-07 23:08 db.root
-rw-r--r--   1 root bind  568 2008-08-27 17:32 named.conf
-rw-r--r--   1 root bind  319 2008-08-27 17:32 named.conf.local
-rw-r--r--   1 root bind  727 2008-08-27 17:32 named.conf.options
-rw-r-----   1 bind bind   77 2008-08-15 12:08 rndc.key
-rw-r--r--   1 root root 1317 2008-07-07 23:08 zones.rfc1918


nevertheless it doesn't work
Code: [Select]
as ~ $  dig @192.168.0.252

; <<>> DiG 9.4.2-P1 <<>> @192.168.0.252
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 3594
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;. IN NS

;; Query time: 59 msec
;; SERVER: 192.168.0.252#53(192.168.0.252)
;; WHEN: Wed Aug 27 17:48:05 2008
;; MSG SIZE  rcvd: 17


And now for the real fun part:

i copied the entire /etc/bind/ directory to a different machine, started bind and it works (on that other machine)!

i "grepped -Hirn bind /var/log/ebox" but that didn't reveal anything either.

I am totally lost at the moment and would appreciate any pointers you guys could give me


javi

  • Zen Hero
  • *****
  • Posts: 1042
  • Karma: +0/-0
    • View Profile
Re: DNS Server no worky
« Reply #1 on: August 29, 2008, 10:24:18 am »
Everything seems to be ok, and the fact that  the very same configuration is working in another machine makes it even more weird.

Ok, let's try some stuff:

Code: [Select]
/etc/init.d/bind9 stop
/etc/init.d/ebox dns restart
dig @127.0.0.1


turbomettwurst

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: DNS Server no worky
« Reply #2 on: September 02, 2008, 01:19:49 pm »
not sure what this supposed to do... :-)

Code: [Select]
root@destiny:~# /etc/init.d/bind9 stop
 * Stopping domain name service... bind                                                                                                                                                                                                      rndc: connect failed: 127.0.0.1#953: connection refused
                                                                                                                                                                                                                                      [fail]
root@destiny:~# /etc/init.d/ebox dns restart
 * Restarting eBox module: dns                                                                                                                                                                                                        [ OK ]
root@destiny:~# dig @127.0.0.1

; <<>> DiG 9.4.2-P1 <<>> @127.0.0.1
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 7230
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;. IN NS

;; Query time: 176 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Sep  2 13:19:06 2008
;; MSG SIZE  rcvd: 17

sixstone

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1417
  • Karma: +26/-0
    • View Profile
    • Sixstone's blog
Re: DNS Server no worky
« Reply #3 on: September 02, 2008, 02:48:50 pm »
Can you try  this resolution request:
Code: [Select]
$ dig @127.0.0.1 www.google.es

To check if DNS cache server is working properly. Likewise, try a configured domain of your zone "mymk.local".

Best regards,
My secret is my silence...

turbomettwurst

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: DNS Server no worky
« Reply #4 on: September 02, 2008, 05:48:51 pm »
Code: [Select]
root@destiny:~# dig @127.0.0.1 www.google.es

; <<>> DiG 9.4.2-P1 <<>> @127.0.0.1 www.google.es
; (1 server found)
;; global options:  printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 14972
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;www.google.es. IN A

;; Query time: 43 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Sep  2 17:48:01 2008
;; MSG SIZE  rcvd: 31
doesn't seem to work :(

sixstone

  • Zentyal Staff
  • Zen Hero
  • *****
  • Posts: 1417
  • Karma: +26/-0
    • View Profile
    • Sixstone's blog
Re: DNS Server no worky
« Reply #5 on: September 03, 2008, 09:40:59 am »
It seems like you don't have access to Internet from this DNS server. Try to add a default gateway in your eBox thru' "Network->Gateways".

Best regards,
My secret is my silence...

turbomettwurst

  • Zen Apprentice
  • *
  • Posts: 14
  • Karma: +0/-0
    • View Profile
Re: DNS Server no worky
« Reply #6 on: September 03, 2008, 11:30:05 am »
Wee thx alot, that was it.. no idea at which point i lost my gateway though...

Ok, onto my next problem. New post :-)