Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

can someone shed some light on this please, i cant seem to resolve my domain foo.com

root@dns:/etc/bind/zones# nslookup foo.com
Server:     192.168.1.54
Address:    192.168.1.54#53

*** Can't find foo.com: No answer

my forward zone file

;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA    ns.foo.com. admin.foo.com. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.foo.com.
ns      IN      A       192.168.1.54

;also list other computers
www     IN      A       192.168.1.54

my syslog file

Jun 10 23:20:57 zild-ubuntu named[13703]: starting BIND 9.8.1-P1 -u bind
Jun 10 23:20:57 zild-ubuntu named[13703]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--enable-ipv6' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2' 'LDFLAGS=-Wl,-Bsymbolic-functions -Wl,-z,relro' 'CPPFLAGS=-D_FORTIFY_SOURCE=2'
Jun 10 23:20:57 zild-ubuntu named[13703]: adjusted limit on open files from 4096 to 1048576
Jun 10 23:20:57 zild-ubuntu named[13703]: found 1 CPU, using 1 worker thread
Jun 10 23:20:57 zild-ubuntu named[13703]: using up to 4096 sockets
Jun 10 23:20:57 zild-ubuntu named[13703]: loading configuration from '/etc/bind/named.conf'
Jun 10 23:20:57 zild-ubuntu named[13703]: reading built-in trusted keys from file '/etc/bind/bind.keys'
Jun 10 23:20:57 zild-ubuntu named[13703]: using default UDP/IPv4 port range: [1024, 65535]
Jun 10 23:20:57 zild-ubuntu named[13703]: using default UDP/IPv6 port range: [1024, 65535]
Jun 10 23:20:57 zild-ubuntu named[13703]: listening on IPv6 interfaces, port 53
Jun 10 23:20:58 zild-ubuntu named[13703]: listening on IPv4 interface lo, 127.0.0.1#53
Jun 10 23:20:58 zild-ubuntu named[13703]: listening on IPv4 interface eth0, 192.168.1.54#53
Jun 10 23:20:58 zild-ubuntu named[13703]: generating session key for dynamic DNS
Jun 10 23:20:58 zild-ubuntu named[13703]: sizing zone task pool based on 7 zones
Jun 10 23:20:58 zild-ubuntu named[13703]: using built-in root key for view _default
Jun 10 23:20:58 zild-ubuntu named[13703]: set up managed keys zone for view _default, file 'managed-keys.bind'
Jun 10 23:20:58 zild-ubuntu named[13703]: Warning: 'empty-zones-enable/disable-empty-zone' not set: disabling RFC 1918 empty zones
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 254.169.IN-ADDR.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: D.F.IP6.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 8.E.F.IP6.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 9.E.F.IP6.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: A.E.F.IP6.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: B.E.F.IP6.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Jun 10 23:20:58 zild-ubuntu named[13703]: command channel listening on 127.0.0.1#953
Jun 10 23:20:58 zild-ubuntu named[13703]: command channel listening on ::1#953
Jun 10 23:20:58 zild-ubuntu named[13703]: zone 0.in-addr.arpa/IN: loaded serial 1
Jun 10 23:20:58 zild-ubuntu named[13703]: zone 127.in-addr.arpa/IN: loaded serial 1
Jun 10 23:20:58 zild-ubuntu named[13703]: zone 1.168.192.in-addr.arpa/IN: loaded serial 2
Jun 10 23:20:58 zild-ubuntu named[13703]: zone 255.in-addr.arpa/IN: loaded serial 1
Jun 10 23:20:58 zild-ubuntu named[13703]: zone foo.com/IN: loaded serial 1
Jun 10 23:20:58 zild-ubuntu named[13703]: zone localhost/IN: loaded serial 2
Jun 10 23:20:58 zild-ubuntu named[13703]: managed-keys-zone ./IN: loaded serial 2
Jun 10 23:20:58 zild-ubuntu named[13703]: running
Jun 10 23:20:58 zild-ubuntu named[13703]: zone 1.168.192.in-addr.arpa/IN: sending notifies (serial 2)

you can see here foo.com is loaded. and my /etc/resolv.conf is also been configured to nameserver 127.0.0.1

Jun 10 23:20:58 zild-ubuntu named[13703]: zone foo.com/IN: loaded serial 1

share|improve this question
    
The "no answer" means DNS isn't responding to the query. Is iptables set properly? Also, try dig foo.com @127.0.0.1 on the server. You may need the dnsutils package if not installed. –  Nathan C Jun 10 '13 at 15:44

1 Answer 1

You have no A record for foo.com, you only have an A record for www.foo.com.

Try dig with www.foo.com or add @ IN A 192.168.1.54 to the zone file.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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