LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
LinkBack Search this Thread
Old 03-16-2010, 04:58 AM   #1
Mortuus
LQ Newbie
 
Registered: Mar 2010
Location: Madrid, Spain
Distribution: Debian Testing
Posts: 21

Rep: Reputation: 0
DNS problem. Errors on named.conf.local [SOLVED]


Hi all!

I'm new at Linux Questions Community

I have a problem with my DNS on Ubuntu 9.10

I have a domain called 'linuxer.com' for my local network (just for practise), but the file named.conf.local gave me some errors. I put here the output of the named-checkzone for this file:

Code:
dns_master_load: named.conf.local:2: unexpected end of line
dns_master_load: named.conf.local:1: unexpected end of input
dns_master_load: named.conf.local:4: unexpected end of line
dns_master_load: named.conf.local:3: unexpected end of input
named.conf.local:5: unknown RR type 'Consider'
named.conf.local:6: unknown RR type 'organization'
dns_master_load: named.conf.local:7: syntax error
dns_master_load: named.conf.local:7: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf.local:7: unbalanced quotes
dns_master_load: named.conf.local:9: syntax error
dns_master_load: named.conf.local:9: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf.local:9: unbalanced quotes
named.conf.local:10: unknown RR type 'master'
named.conf.local:11: unknown RR type '{'
dns_master_load: named.conf.local:12: syntax error
dns_master_load: named.conf.local:12: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf.local:12: unbalanced quotes
dns_master_load: named.conf.local:14: unexpected end of line
dns_master_load: named.conf.local:13: unexpected end of input
dns_master_load: named.conf.local:15: syntax error
dns_master_load: named.conf.local:15: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf.local:15: unbalanced quotes
named.conf.local:16: unknown RR type 'master'
named.conf.local:17: unknown RR type '{'
dns_master_load: named.conf.local:18: syntax error
dns_master_load: named.conf.local:18: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf.local:18: unbalanced quotes
dns_master_load: named.conf.local:20: unexpected end of line
dns_master_load: named.conf.local:19: unexpected end of input
zone named.conf.local/IN: loading from master file named.conf.local failed: unexpected end of input
It says that there are a lot of errors, but I didn't find those errors, I copy you the content of named.conf.local:

Code:
//
// 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 "linuxer.com" {
type master;
allow-query { any; };
file "/etc/bind/db.linuxer.com";
};

zone "0.26.172.in-addr.arpa" {
type master;
allow-query { any; };
file "/etc/bind/db.172.26.0";
};
I also checked 'db.linuxer.com' and 'db.172.26.0' and both returned me an OK.

This is strange, because my domain answers to all petitions:

Code:
ping hell.linuxer.com
PING hell.linuxer.com (172.26.0.35) 56(84) bytes of data.
64 bytes from hell.linuxer.com (172.26.0.35): icmp_seq=1 ttl=64 time=0.028 ms
64 bytes from hell.linuxer.com (172.26.0.35): icmp_seq=2 ttl=64 time=0.039 ms
Code:
host hell.linuxer.com
hell.linuxer.com has address 172.26.0.35
Code:
host 172.26.0.35
35.0.26.172.in-addr.arpa domain name pointer hell.linuxer.com.
Code:
dig linuxer.com

; <<>> DiG 9.6.1-P2 <<>> linuxer.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 34734
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;linuxer.com.			IN	A

;; ANSWER SECTION:
linuxer.com.		10800	IN	A	172.26.0.35

;; AUTHORITY SECTION:
linuxer.com.		10800	IN	NS	hell.linuxer.com.

;; ADDITIONAL SECTION:
hell.linuxer.com.	10800	IN	A	172.26.0.35
What could be wrong on named.conf.local?


Thanks you all.

Last edited by Mortuus; 03-16-2010 at 08:19 AM.
 
Old 03-16-2010, 05:15 AM   #2
spampig
Member
 
Registered: Feb 2010
Location: /Earth/UK/England/Hampshire
Distribution: Debian, Ubuntu, CentOS, Slackware
Posts: 262
Blog Entries: 2

Rep: Reputation: 56
The fact that it is complaining about line 1 & 2 makes me wonder - is // an acceptable 'comments' delimiter? I'm familiar with ';' and '#' but I can't say I see lots of '//' in conf files.

Also, are you editing this on Ubuntu or cut/pasting from a Windows editor?

I'm guessing that the file named.conf.local is being included into the config from the real named.conf file - I've not seen it done like that but it's not uncommon with debian based distros. I'd be interested to see how named.conf is calling it in, if there are any errors at the end of named.conf and what happens when you remove the comments secion using '//'.
 
1 members found this post helpful.
Old 03-16-2010, 05:50 AM   #3
Mortuus
LQ Newbie
 
Registered: Mar 2010
Location: Madrid, Spain
Distribution: Debian Testing
Posts: 21

Original Poster
Rep: Reputation: 0
Thanks for replying.

I'm editing all on Ubuntu, nothing comes from Windows.

The comments with '//' were included by default, I didn't add those comments, but I changed '//' to ';' and the named-checkzone output now is:

Code:
dns_master_load: named.conf.local:9: syntax error
dns_master_load: named.conf.local:9: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf.local:9: unbalanced quotes
named.conf.local:10: unknown RR type 'master'
named.conf.local:11: unknown RR type '{'
dns_master_load: named.conf.local:12: syntax error
dns_master_load: named.conf.local:12: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf.local:12: unbalanced quotes
dns_master_load: named.conf.local:14: unexpected end of line
dns_master_load: named.conf.local:13: unexpected end of input
dns_master_load: named.conf.local:15: syntax error
dns_master_load: named.conf.local:15: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf.local:15: unbalanced quotes
named.conf.local:16: unknown RR type 'master'
named.conf.local:17: unknown RR type '{'
dns_master_load: named.conf.local:18: syntax error
dns_master_load: named.conf.local:18: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf.local:18: unbalanced quotes
dns_master_load: named.conf.local:20: unexpected end of line
dns_master_load: named.conf.local:19: unexpected end of input
zone named.conf.local/IN: loading from master file named.conf.local failed: syntax error
Less errors... I don't understand why '//' are added by default.

I didn't write anything on named.conf, but it also had comments with '//' . The checkzone output for named.conf is (with no '//'):
Code:
dns_master_load: named.conf:9: syntax error
dns_master_load: named.conf:9: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf:9: unbalanced quotes
dns_master_load: named.conf:10: syntax error
dns_master_load: named.conf:10: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf:10: unbalanced quotes
dns_master_load: named.conf:11: syntax error
dns_master_load: named.conf:11: isc_lex_gettoken() failed: unbalanced quotes
dns_master_load: named.conf:11: unbalanced quotes
zone named.conf/IN: loading from master file named.conf failed: syntax error
And the file content now:
Code:
; This is the primary configuration file for the BIND DNS server named.
;
; Please read /usr/share/doc/bind9/README.Debian.gz for information on the 
; structure of BIND configuration files in Debian, *BEFORE* you customize 
; this configuration file.
;
; If you are just adding zones, please do that in /etc/bind/named.conf.local

include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.local";
include "/etc/bind/named.conf.default-zones";
Thanks for helping.
 
Old 03-16-2010, 06:16 AM   #4
spampig
Member
 
Registered: Feb 2010
Location: /Earth/UK/England/Hampshire
Distribution: Debian, Ubuntu, CentOS, Slackware
Posts: 262
Blog Entries: 2

Rep: Reputation: 56
Now I've woken up I've spotted you are using 'named-checkzone'. You must point this only to a zonefile, not to a config file. Can you confirm you are running:

Quote:
sudo named-checkzone linuxer.com /etc/bind/db.linuxer.com
And not:
Quote:
sudo named-checkzone linuxer.com /etc/bind/named.conf.local
The next step would be to look at the contents of the zonefile itself if this is what you are doing.
 
1 members found this post helpful.
Old 03-16-2010, 06:31 AM   #5
Mortuus
LQ Newbie
 
Registered: Mar 2010
Location: Madrid, Spain
Distribution: Debian Testing
Posts: 21

Original Poster
Rep: Reputation: 0
Wow, what an error hehe... I thought that I could check errors with:
Code:
named-checkzone named.conf.local /etc/bind/named.conf.local
The content for db.linuxer.com is:
Code:
@       IN      SOA     linuxer.com. hell.linuxer.com. (
                1       ; Serial
                          86400         ; Refresh
                           7200         ; Retry
                        1209600         ; Expire
                          10800 )       ; Negative Cache TTL

linuxer.com.    IN      NS      hell.linuxer.com.
localhost       IN      A       127.0.0.1
linuxer.com.    IN      A       172.26.0.35
hell		IN	A	172.26.0.35
www		IN	CNAME	hell
linuxer.com.	IN	MX	1 hell.linuxer.com.
The checkzone output for this file:
Code:
db.linuxer.com:1: no TTL specified; using SOA MINTTL instead
zone linuxer.com/IN: loaded serial 1
OK
The content for db.172.26.0:
Code:
@       IN      SOA     linuxer.com. hell.linuxer.com. (
                1       ; Serial
                          86400         ; Refresh
                           7200         ; Retry
                        1209600         ; Expire
                          10800 )       ; Negative Cache TTL

@    IN      NS      hell.linuxer.com.
35              IN      PTR     hell.linuxer.com.
The checkzone output:
Code:
db.172.26.0:1: no TTL specified; using SOA MINTTL instead
zone 0.26.172.in-addr.arpa/IN: loaded serial 1
OK
 
Old 03-16-2010, 06:34 AM   #6
spampig
Member
 
Registered: Feb 2010
Location: /Earth/UK/England/Hampshire
Distribution: Debian, Ubuntu, CentOS, Slackware
Posts: 262
Blog Entries: 2

Rep: Reputation: 56
Looks like you fixed it Mortuus :-) - Next time remind me to put my reading glasses on and drink 4 cups of coffee before I answer :-)
 
1 members found this post helpful.
Old 03-16-2010, 06:51 AM   #7
Mortuus
LQ Newbie
 
Registered: Mar 2010
Location: Madrid, Spain
Distribution: Debian Testing
Posts: 21

Original Poster
Rep: Reputation: 0
Already? :O

My teacher told me that when I do 'ping 172.26.0.35', it must answer with the ip and the domain, like when I do 'ping hell.linuxer.com'

Code:
ping hell.linuxer.com
PING hell.linuxer.com (172.26.0.35) 56(84) bytes of data.
64 bytes from hell.linuxer.com (172.26.0.35): icmp_seq=1 ttl=64 time=0.033 ms
64 bytes from hell.linuxer.com (172.26.0.35): icmp_seq=2 ttl=64 time=0.042 ms
Code:
ping 172.26.0.35
PING 172.26.0.35 (172.26.0.35) 56(84) bytes of data.
64 bytes from 172.26.0.35: icmp_seq=1 ttl=64 time=0.041 ms
On 172.26.0.35 doesn't returns the domain... Is it correct?

spampig thanks for everything
 
Old 03-16-2010, 07:14 AM   #8
spampig
Member
 
Registered: Feb 2010
Location: /Earth/UK/England/Hampshire
Distribution: Debian, Ubuntu, CentOS, Slackware
Posts: 262
Blog Entries: 2

Rep: Reputation: 56
What does
Quote:
dig -x 172.26.0.35
give you?

or better still
Quote:
dig @ip.of.your.bindserver -x 172.26.0.35
Have you defined reverse zones for 172.x.x.x as well? If not take a look at:

http://www.linuxquestions.org/questi...2/#post3897645
in particular reverse zones section :-)
 
Old 03-16-2010, 07:29 AM   #9
Mortuus
LQ Newbie
 
Registered: Mar 2010
Location: Madrid, Spain
Distribution: Debian Testing
Posts: 21

Original Poster
Rep: Reputation: 0
Yes, I've defined the reverse zone

The output for dig is:

Code:
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 28547
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1

;; QUESTION SECTION:
;35.0.26.172.in-addr.arpa.	IN	PTR

;; ANSWER SECTION:
35.0.26.172.in-addr.arpa. 10800	IN	PTR	hell.linuxer.com.

;; AUTHORITY SECTION:
0.26.172.in-addr.arpa.	10800	IN	NS	hell.linuxer.com.

;; ADDITIONAL SECTION:
hell.linuxer.com.	10800	IN	A	172.26.0.35

;; Query time: 0 msec
;; SERVER: 172.26.0.35#53(172.26.0.35)
;; WHEN: Tue Mar 16 13:23:58 2010
;; MSG SIZE  rcvd: 102
nslookup command answers fine too.

So... the reverse works fine, even if ping does not return the domain

Or I'm wrong?

Thanks
 
Old 03-16-2010, 07:40 AM   #10
spampig
Member
 
Registered: Feb 2010
Location: /Earth/UK/England/Hampshire
Distribution: Debian, Ubuntu, CentOS, Slackware
Posts: 262
Blog Entries: 2

Rep: Reputation: 56
On my boxes I only get IP's even for google. Take a look at this post:
http://www.linuxquestions.org/questi...stname-582026/

Quote:
dig google.com
;; ANSWER SECTION:
google.com. 192 IN A 209.85.229.147

ping 209.85.229.147
PING 209.85.229.147 (209.85.229.147) 56(84) bytes of data.
64 bytes from 209.85.229.147: icmp_seq=1 ttl=56 time=34.1 ms
64 bytes from 209.85.229.147: icmp_seq=2 ttl=56 time=34.1 ms
64 bytes from 209.85.229.147: icmp_seq=3 ttl=56 time=35.7 ms
 
Old 03-16-2010, 08:16 AM   #11
Mortuus
LQ Newbie
 
Registered: Mar 2010
Location: Madrid, Spain
Distribution: Debian Testing
Posts: 21

Original Poster
Rep: Reputation: 0
Ok, in that case, all is fine hehe

Thank you for all, spampig
 
  


Reply

Tags
lq


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Question about DNS named.conf, .. wegadnie Linux - Server 1 11-22-2008 07:53 PM
DNS named.conf master/slave question pao Linux - Networking 5 11-12-2004 04:50 AM
Update DNS forwarders in named.conf automatically? linuxuser2005 Linux - Networking 3 08-21-2004 03:26 PM
DNS named.conf path asyadiqin Linux - Newbie 1 08-11-2004 10:19 PM
DNS and named.local file Breezwell Linux - Networking 0 04-23-2001 07:05 PM


All times are GMT -5. The time now is 03:01 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration