LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Annoying syntax error with named.conf (https://www.linuxquestions.org/questions/linux-networking-3/annoying-syntax-error-with-named-conf-350739/)

d0ugb 08-06-2005 11:44 PM

Annoying syntax error with named.conf
 
Okay, im a newbie when it comes to setting up and configuring bind. I have been following along with the essential book "DNS and BIND" and i have hit a brick wall. Here is my named.conf
---------------------------------------

options {
directory "/var/bind";

};

zone "m0shady.org" in {
type master;
file "pri/db.m0shady";
};

zone "0.0.10.in-addr.arpa" in {
type master;
file "pri/db.10.0.0;
};

zone "0.0.127.in-addr.arpa." in {
type master;
file "pri/db.127.0.0";
};

zone "." in {
type hint;
file"named.ca";
};

-------------------------------------------------

when i try and execute named i get this error

loading configuration from '/etc/bind/named.conf'
/etc/bind/named.conf:16: missing ';' before '0.0.127.in-addr.arpa.'
/etc/bind/named.conf:16: unknown option '0.0.127.in-addr.arpa.'
/etc/bind/named.conf:25: unexpected end of input
loading configuration: unexpected end of input

this is driving me nuts, im sure that i have typed something wrong, if anyone can help i would appreciate it. Thanx.

roopunix 08-06-2005 11:53 PM

before starting named by starting the service's . post the error messege of this command

#named-checkconf

d0ugb 08-06-2005 11:58 PM

here is the response
 
m0shady root # named-checkconf
/etc/bind/named.conf:16: missing ';' before '127.in-addr.arpa.'
/etc/bind/named.conf:16: unknown option '127.in-addr.arpa.'
/etc/bind/named.conf:25: unexpected end of input
m0shady root #

RHELL 08-07-2005 12:22 AM

You have a trailing dot after '0.0.127.in-addr.arpa'.

Also, the internet class is default, but if you want to explicitly indicate it in your 'zone' statements, I would use caps: 'IN'.

Good luck.

roopunix 08-07-2005 12:25 AM

I think this is much is still not going to avoid the errors.

Can you tell me what distro are you using?

RHELL 08-07-2005 12:37 AM

You also missed a close quote on this line:
file "pri/db.10.0.0;

d0ugb 08-07-2005 08:40 AM

gentoo
 
The distro im using is gentoo

Pete M 08-07-2005 12:20 PM

d0ugb

First thing I would do is add a forward zone for localhost
Code:

options {
directory "/var/bind";

};

zone "m0shady.org" in {
type master;
file "pri/db.m0shady";
};

zone "0.0.10.in-addr.arpa" in {
type master;
file "pri/db.10.0.0;
};

zone "localhost" IN {
type master;
file "pri/localhost.zone";
};

zone "0.0.127.in-addr.arpa." in {
type master;
file "pri/db.127.0.0";
};

zone "." in {
type hint;
file"named.ca";
};

/pri/localhost.zone
Code:

$TTL 1W
@      IN      SOA    ns.localhost. root.localhost.  (
                                      2002081601 ; Serial
                                      28800      ; Refresh
                                      14400      ; Retry
                                      604800    ; Expire - 1 week
                                      86400 )    ; Minimum
                IN      NS      ns
localhost.        IN        A        127.0.0.1

Sorry put it right now
Pete


All times are GMT -5. The time now is 07:04 AM.