Find the answer to your Linux question:
Results 1 to 3 of 3
Hi all, hope you can help me. I've just set up a linux box and am using BIND9 for DNS. Caching nameserver works great, but I have also set up ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Location
    Ballina, NSW AU
    Posts
    3

    Cant get DNS to resolve local A records


    Hi all, hope you can help me. I've just set up a linux box and am using BIND9 for DNS. Caching nameserver works great, but I have also set up a local zone called "lan" but can't seem to get the A records to resolve. Its as if the machine is ignoring the whole zone.

    All I want to be able to do is give my router and other PC's a DNS name so that I can type it in instead of having to use the IP address everytime!

    I have run named-checkconf and named-checkzone to make sure I have everything right but still cant get it to work.

    Below are the named.conf and lan.zone files, hope someone can help me!

    Start named.conf:

    Code:
    options {
    directory "/var/named";
    };
    
    zone "." IN {
    type hint;
    file "named.ca";
    };
    
    zone "0.0.127.in-addr.arpa" IN {
    type master;
    file "localhost.rev";
    };
    
    zone "0.168.192.in-addr.arpa" {
    type master;
    file "lan.rev";
    allow-transfer { 127.0.0.1; };
    };
    
    zone "lan" IN {
    type master;
    file "lan.zone";
    notify yes;
    allow-transfer { 127.0.0.1; };
    };
    End of named.conf

    Start of lan.zone

    Code:
    $TTL 3D
    @ IN SOA server.lan. root.lan. (
    2004111401 ; serial (d. adams)
    3H ; refresh
    15M ; retry
    1W ; expiry
    1D ) ; minimum
    
    @ IN NS server.lan.
    
    IN MX 10 server.lan.
    
    router.lan. IN A 192.168.0.1
    server.lan. IN A 192.168.0.2
    nerdina.lan. IN A 192.168.0.10
    gibblet.lan. IN A 192.168.0.11
    Mod edit - added code tags.

  2. #2
    Linux Enthusiast scientica's Avatar
    Join Date
    Sep 2003
    Location
    South- or "Mid-" Sweden
    Posts
    742
    hmm... I jsut came to think of one thing, are you "required" to have an reversed look up too? (IP to name, iirc 'PTR' entries)
    It might be that which causes the error, not sure, but afaik one should always provide the IP to name.
    Regards Scienitca (registered user #335819 - http://counter.li.org )
    --
    A master is nothing more than a student who knows something of which he can teach to other students.

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    Just a pre-takeoff checklist:
    1. Have you set the DNS server in /etc/resolv.conf on all clients to be only 192.168.0.2?
    2. Are you: A. Actually resolving "router.lan", and not just "router", or B. added "search lan" to /etc/resolv.conf on all clients?

    If you check out on both the above points, what happens if you run the following?
    Code:
    host -a server.lan.

  4. $spacer_open
    $spacer_close

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •