For my own DNS server, "dig ... @ip-address" works, but "dig ... @domainname" does not

1

0

I've recently begun virtualizing servers - one of which is a DNS server running BIND 9 on Debian 7. My DHCP server correctly issues it as the primary DNS for the network, but I get the following error if I try to use dig kilraine.lan @dns.kilraine.lan

couldn't get address for 'dns.kilraine.lan': not found

Though I get the original dig output from dig kilraine.lan @192.168.1.2.

Details:

BIND 9 on Debian 7; Virtualized CT through Proxmox.

Zone file (the email has been changed to hide my personal info)

; BIND data file for kilraine zone
;
$TTL    604800
@       IN      SOA     kilraine.lan. myaddress.myemail.com. (
                     2014060303         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL

        IN      A       192.168.1.2
;
@       IN      NS      dns.kilraine.lan
@       IN      A       192.168.1.2

dns2    IN      A       192.168.1.1
dns     IN      A       192.168.1.2
dhcp    IN      A       192.168.1.3
main    IN     A      192.168.1.10

Reverse zone file

;
; BIND reverse data file for kilraine.lan
;
$TTL    604800
@       IN      SOA     kilraine.lan. myaddress.myemail.com. (
                     3006201401         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      dns.
1       IN      PTR     dns2.kilraine.lan
2       IN      PTR     dns.kilraine.lan
3       IN      PTR     dhcp.kilraine.lan
10      IN      PTR     main.kilraine.lan

And lastly my named.conf.local file.

//
// Do any local configuration here
//

// Consider adding the 1918 zones here, if they are not used in your
// organization
// include "/etc/bind/zones.rfc1918";

zone "kilraine.lan" {
        type master;
        file "/etc/bind/db.kilraine.lan";
};

zone "1.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.192";
};

I have restarted BIND 9 numerous times, and I have always gotten "OK". I used the dnsutils tool 'dig' on both the server and a client, each return the following

    ; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> kilraine.lan
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 46467
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;kilraine.lan.          IN  A

;; Query time: 2 msec
;; SERVER: 192.168.1.2#53(192.168.1.2)
;; WHEN: Mon Jun 30 21:53:41 2014
;; MSG SIZE  rcvd: 30

Confused sysadmin

Posted 2014-07-01T03:42:28.387

Reputation: 1

Answers

1

Your missing some periods in the reverse records. Should end with "kilraine.lan.", vice "kilraine.lan". Also, the NS record shouldshould be "dns.kilraine.lan." vice "dns." or "dns.kilraine.lan". If you leave off the terminating period, you're essentially asking BIND to add on the zone name (i.e., you'll end up with dns.kilraine.lan.kilraine.lan).

Other questions/comments/thoughts:

  • Did you restart the service (or reload the zones) after making changes?
  • Is your resolver pointing at your DNS server?
  • Is BIND listening on port 53? Is there are host firewall on the server which is blocking any attempt to access the DNS service?
  • Does "dig main.kilraine.lan" return anything different from "dig @192.168.1.1 main.kilraine.com"?
  • Have you looked at your log tiles after restarting the service?

joat

Posted 2014-07-01T03:42:28.387

Reputation: 466