Problems setting up authoritative only name server

Project:Linux software
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Related pages:#246: Troubleshooting bind9
Description

I am trying to set up and authoritative only name server for lesenjeux.fr but
I get status: REFUSED:

# dig @94.23.215.207 A lesenjeux.fr

; <<>> DiG 9.7.3 <<>> @94.23.215.207 A lesenjeux.fr
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 10116
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;lesenjeux.fr.                  IN      A

;; Query time: 1 msec
;; SERVER: 94.23.215.207#53(94.23.215.207)
;; WHEN: Fri Jan 20 07:33:13 2012
;; MSG SIZE  rcvd: 30

Comments

#1

I had configured it but forgot to restart bind.
However, there seems to be a configuration problem as I get: status: SERVFAIL,

# dig @94.23.215.207 SOA lesenjeux.fr

; <<>> DiG 9.7.3 <<>> @94.23.215.207 SOA lesenjeux.fr
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: SERVFAIL, id: 55627
;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;lesenjeux.fr.                  IN      SOA

;; Query time: 0 msec
;; SERVER: 94.23.215.207#53(94.23.215.207)
;; WHEN: Fri Jan 20 07:36:45 2012
;; MSG SIZE  rcvd: 30

#2

telnet 127.0.0.1 53

Ok.

#3

from syslogs:

Jan 20 07:35:19 stock named[11295]: dns_rdata_fromtext: /etc/bind/zones/rev.207.215.23.94in-addr.arpa:6: near eol: unexpected end of input
Jan 20 07:35:19 stock named[11295]: zone 207.215.23.94.in-addr.arpa/IN: loading from master file /etc/bind/zones/rev.207.215.23.94in-addr.arpa failed: unexpected end of input
Jan 20 07:35:19 stock named[11295]: zone 207.215.23.94.in-addr.arpa/IN: not loaded due to errors.
Jan 20 07:35:19 stock named[11295]: dns_rdata_fromtext: /etc/bind/zones/lesenjeux.fr.zone:6: near eol: unexpected end of input
Jan 20 07:35:19 stock named[11295]: zone lesenjeux.fr/IN: loading from master file /etc/bind/zones/lesenjeux.fr.zone failed: unexpected end of input
Jan 20 07:35:19 stock named[11295]: zone lesenjeux.fr/IN: not loaded due to errors.
Jan 20 07:35:19 stock named[11295]: zone localhost/IN: loaded serial 2
Jan 20 07:35:19 stock named[11295]: managed-keys-zone ./IN: loading from master file managed-keys.bind failed: file not found

#4

# named-checkzone lesenjeux.fr zones/lesenjeux.fr.zone
dns_rdata_fromtext: zones/lesenjeux.fr.zone:6: near eol: unexpected end of input
zones/lesenjeux.fr.zone:8: no TTL specified; zone rejected
zones/lesenjeux.fr.zone:9: no TTL specified; zone rejected
zones/lesenjeux.fr.zone:10: no TTL specified; zone rejected
zones/lesenjeux.fr.zone:11: no TTL specified; zone rejected
zones/lesenjeux.fr.zone:12: no TTL specified; zone rejected
zone lesenjeux.fr/IN: loading from master file zones/lesenjeux.fr.zone failed: unexpected end of input
zone lesenjeux.fr/IN: not loaded due to errors.

#5

The "TTL" error was easy to fix. I added the following at the top of the file:

$TTL            300

The "unexpected end of input" error was more subtle. For reasons I do not understand yet, two domains are required.

Originally, I had:
lesenjeux.fr. IN  SOA  ns.lesenjeux.fr. (...)
with the parenthesis indicating a multi-line configuration item.
And that specific error was resolved by adding a domain (I thought I didn't need it and I thought I was clever by removing it from the tutorial I was reading!) like this:
lesenjeux.fr. IN  SOA  ns.lesenjeux.fr. admin.lesenjeux.fr. (...)

Now, I am reading the official manual to understand the proper grammar and the use of that second domain.

#6

I am getting confuseder and confuseder....

Right when I thought I had fixed one problem by having two domains in that line:

lesenjeux.fr. IN  SOA  ns.lesenjeux.fr. root (

I am following another tutorial that does not have the IN and only one domain:
@   SOA ns1 (

#7

The official documentation is very bad at describing how to write zone files. It does not say what the RDATA is for a SOA record in the zone file.

#8

Answers:
The "IN" is optional.

The extra 'domain' is actually an email address. See:
http://www.zytrax.com/books/dns/ch8/ns.html

#9

things are starting to look good:

dig @94.23.215.207 A lesenjeux.fr

; <<>> DiG 9.7.3 <<>> @94.23.215.207 A lesenjeux.fr
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13049
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 2
;; WARNING: recursion requested but not available

;; QUESTION SECTION:
;lesenjeux.fr.                  IN      A

;; ANSWER SECTION:
lesenjeux.fr.           300     IN      A       94.23.215.207

;; AUTHORITY SECTION:
lesenjeux.fr.           300     IN      NS      ns1.lesenjeux.fr.
lesenjeux.fr.           300     IN      NS      ns2.lesenjeux.fr.

;; ADDITIONAL SECTION:
ns1.lesenjeux.fr.       300     IN      A       94.23.215.207
ns2.lesenjeux.fr.       300     IN      A       94.23.215.207

;; Query time: 288 msec
;; SERVER: 94.23.215.207#53(94.23.215.207)
;; WHEN: Sun Jan 22 15:55:09 2012
;; MSG SIZE  rcvd: 114

:)

#10

I added "Confusing syntax" in the troubleshooting bind9 article, to explain the cause of my confusion.

#11

Status:active» fixed

#12

Status:fixed» closed
Related pages:-246: Troubleshooting bind9

Automatically closed -- issue fixed for 2 weeks with no activity.