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

4
  • What does your /etc/resolv.conf look like? Can you show the output of 'dig @localhost router.local.lan'?
    – user143703
    Jun 10, 2013 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.
    – user143703
    Jun 10, 2013 at 20:22
  • resolve.conf: # Generated by NetworkManager nameserver 192.168.1.160
    – caliph
    Jun 10, 2013 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.
    – user143703
    Jun 11, 2013 at 11:52

1 Answer 1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .