1

I am trying to setup a DNS for a standard lan zone. I have now read every bit of info available but still the DNS server does not resolve with nslookup or dig e.g. "nslookup router.local.lan" => ** server can't find router.local.lan: NXDOMAIN

named.conf file:

options {
    directory   "/var/named";
    dump-file   "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";

        // Forward any unresolved requests to DNS of ISP
    allow-recursion {
        localhost;
        192.168.1.0/24;
        };
        forwarders {
        217.237.151.51;
        };
};

zone "local.lan" {
        type master;
        file "lan.zone";
        notify yes;
};

lan.zone File

$TTL 3600
@ IN     SOA    romeo0.local.lan. admin.local.lan. (
            2013061001  ; Serial
            3H          ; refresh after 3 hours
            1H          ; retry after 1 hour
            1W          ; expire after 1 week
            1D)         ; minimum TTL of 1 day
@   IN  NS  romeo0.
@      IN      A        192.168.1.160
router   IN      A      192.168.1.1
romeo1   IN      A      192.168.1.161

Can someone help me finding the mistake I am making? Any help is much appreciated.

Edit: I found the solution: I the DNS server in resolve.conf was wrong And I needed to remove the dot as yoonix pointed out

  • What does your /etc/resolv.conf look like? Can you show the output of 'dig @localhost router.local.lan'? – yoonix Jun 10 '13 at 19:55
  • I should also point out that you need to remove the dot at the end of the line '@ IN NS romeo0.' The dot indicates that it's a fully qualified domain name, when you actually want it to append 'local.lan' to the end of it. I usually specify the full host name in my NS records out of habit. – yoonix Jun 10 '13 at 20:22
  • resolve.conf: # Generated by NetworkManager nameserver 192.168.1.160 – caliph Jun 10 '13 at 21:10
  • 2
    Is that the correct IP of the server running BIND? All the configuration above (not including resolv.conf) configures the BIND service, but it does not tell your computer to actually use it. That's what resolv.conf is for. – yoonix Jun 11 '13 at 11:52
0

yoonix is correct, the "." on this line:

@   IN  NS  romeo0.

is not correct. Also, do you have an A record for romeo0? I'm guessing, but I think what you wanted is:

         IN      NS     romeo0.local.lan.
romeo0   IN      A      192.168.1.160
router   IN      A      192.168.1.1
romeo1   IN      A      192.168.1.161

from: http://www.zytrax.com/books/dns/ch8/origin.html

The symbol @ forces substitution of the current (or synthesized) value of $ORIGIN. The @ symbol is replaced with the current value of $ORIGIN.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.