** SOLVED ** - thanks everyone, it's working now. I had additionally mistyped the IPs of the dev boxes >_<

UPDATE 2- Ok, parse errors are gone and no more errors in syslog. I'm still unable to ping using dev1 but I can using the ip address. Any ideas? I updated /etc/bind/local-network (see below). My resolv.conf contains- nameserver

I do 'ping dev1' this and get- ping: unknown host dev1 and this will show up in syslog-

Jun  1 17:14:50 local-dns named[2892]: network unreachable resolving 'dev1/A/IN': 2001:dc3::35#53
Jun  1 17:14:51 local-dns named[2892]: network unreachable resolving 'dev1/A/IN': 2001:500:3::42#53
Jun  1 17:14:51 local-dns named[2892]: network unreachable resolving 'dev1/A/IN': 2001:503:c27::2:30#53
Jun  1 17:14:53 local-dns named[2892]: network unreachable resolving 'dev1/A/IN': 2001:500:1::803f:235#53
Jun  1 17:14:54 local-dns named[2892]: network unreachable resolving 'dev1/A/IN': 2001:500:2f::f#53
Jun  1 17:14:58 local-dns named[2892]: network unreachable resolving 'dev1/A/IN': 2001:7fd::1#53
Jun  1 17:14:59 local-dns named[2892]: too many timeouts resolving 'dev1/A' (in '.'?): disabling EDNS

Any ideas as how to diagnose further?

UPDATE 1- I see this error in my syslog: (i don't see where it would think the syntax is invalid)

Jun  1 16:19:08 local-dns named[2402]: dns_rdata_fromtext: /etc/bind/local-network:7: near eol: unexpected end of input
Jun  1 16:19:08 local-dns named[2402]: zone local-network/IN: loading from master file /etc/bind/local-network failed: unexpected end of input

I've been using /etc/hosts for a while now and it's getting a pain to manage. I'm interested in using BIND on a linux server for my LAN at home. I'd like to make it so any comp on my network can access the server 'dev1' and 'dev2' without having to set it up in a hosts file.

here are the ip mappings to my dev boxes- dev1 -> dev2 ->

i set the dns server to use

I've look at some resources online but i haven't been able to get it working quite yet. here's what I have so far-

This is what's in my /etc/bind/named.conf.local:

zone "local-network" {
        type master;
        notify no;
        file "local-network";

and in /etc/bind/local-network:

@       IN      SOA     ns.local-network. ns.local-network. (
                        199802151       ; serial, todays date + todays serial #
                        28800              ; refresh, seconds
                        172800              ; retry, seconds
                        2419200              ; expire, seconds
                        86400           ; minimum, seconds
                NS      ns.local-network.  ; Inet Address of name server
localhost       IN      A
ns              IN      A
dev1            IN      A
dev2            IN      A

Does that look right?

and then I once the dns server is setup I need to tell my router that does dhcp to use the internal dns server I just setup instead of my IPSs, so all the comps on the LAN use it--right?

  • Dude, did you read my answer? Yes, your local-network file has a syntax error, and I told you what it is. – chaos Jun 1 '09 at 22:29
  • yes, thankyou! I had seen it but it took me a while to understand exactly you were meaning. – user7321 Jun 1 '09 at 22:55
  • 1
    You're welcome. :) Now you need to add 'search local-network' to your resolv.conf. – chaos Jun 2 '09 at 2:32

Yeah, mostly. Your SOA record is missing its responsible-person email address, though.

  • Thanks again btw- I was initially confused by what you were saying. But this was indeed the cause of the parse error. – user7321 Jun 1 '09 at 23:06

Use dnsmasq. It's a lightweight DHCP/DNS server. It automatically serves stuff in /etc/hosts and DHCP leases as DNS entries, forwards everything else to your ISP's DNS server.

Works like a charm, extremely easy to configure.

  • Thanks for the tip! I will look into this later tonight. – user7321 Jun 1 '09 at 22:26
  • I agree that for small networks dnsmasq is very adequate, specially due to the auto update of the name if you do not have fixed ips on the IP lease. – njsf Jun 1 '09 at 22:29
  • Way better/easier than bind for small networks. +1 – Daniel Huckstep Jun 1 '09 at 23:47

I would fully qualify the file command in your named.conf.local so it would look like file /etc/bind/local-network

Also i would make sure that the bind daemon user has read permissions to the zone file.

Do you have any error messages in /var/log/messages or /var/log/daemon.log ? (I've seen bind write to both places.)

$TTL 3600       ; 1 hour  
domain.com               IN SOA ns1.domain.com. user.domain.com. (  
                                2008123002     ; serial  
                                900        ; refresh (15 minutes)  
                                600        ; retry (10 minutes)  
                                86400      ; expire (1 day)  
                                3600       ; minimum (1 hour)  
                        NS      ns1.domain.com.    
                        A       <ip of host>  

$ORIGIN domain.com.  
ns2             IN      A       x.x.x.x  
ftp             IN      A       x.x.x.x
  • good call, I checked /var/log/daemon.log and it looks like /etc/bind/local-network has some invalid syntax or something. I added an update to the original question – user7321 Jun 1 '09 at 22:25
  • Couple of other things, i would fully qualify your NS entry so it would look like ns.domain.local. (yes you need the period on the end) also you don't have your records setup right so your ns record should be NS IN A (you are missing the 'IN' and as chaos said you are missing your responsible person – Zypher Jun 1 '09 at 22:31
  • ps added an example based off my working config ips/hostnames removed – Zypher Jun 1 '09 at 22:35

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.