Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
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 '//'.
; 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";
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:
@ 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
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.