LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-10-2011, 11:20 AM   #1
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Rep: Reputation: 3
bind problems in centos 6.0


hi guys, im kinda new here. Just about finished school and trying to set up a centos server to go for some certs. Anyway, I'm trying to get my DNS up and running I'm having some troubles.

This is also on a virtual box. If you need anymore information just let me know.
here is the log messages that generate when i try to do a
service named restart:

Error in named configuration:
zone localhost/IN: loaded serial 2006123106
dns_rdata_fromtext: 127.0.0.rev:7: near 'IN': extra input text
zone 0.0.127.in-addr.arpa/IN: loading from master file 127.0.0.rev failed: extra input text
zone 0.0.127.in-addr.arpa/IN: not loaded due to errors.
_default/0.0.127.in-addr.arpa/in: extra input text
zone example.org/IN: loaded serial 2009123106
dns_rdata_fromtext: example.org.rev:3: near '3H': not a valid number
zone 15.2.0.10.in-addr.arpa/IN: loading from master file example.org.rev failed: not a valid number
zone 15.2.0.10.in-addr.arpa/IN: not loaded due to errors.
_default/15.2.0.10.in-addr.arpa/IN: not a valid number

Thanks guys
 
Old 12-10-2011, 11:28 AM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

Hi malak33,

Welcome to LQ!!!

It appears that you are trying to start bind service without configuring it. You need to first configure bind and then it will start. Please refer the following link: http://www.centos.org/docs/5/html/De...S/ch-bind.html

It will be good to know as to which certifications you are targeting so that we can provide you guidance accordingly.
 
1 members found this post helpful.
Old 12-10-2011, 11:45 AM   #3
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Original Poster
Rep: Reputation: 3
T3RM1NVT0R thanks for the warm welcome, i am trying to work my to RHCSA cert... we will see.
I don't think i was quite clear in my last post. I am working through a book at the moment it is called linux administration: a beginner's guide. In it we are setting up a DNS server right now. I must have done something wrong and I'm not quite sure where at.
I am coming from setting up windows 2008 servers which is quite different so please be kind...

i have it set up i have the named.conf file here. I also have files called /var/named/localhost.db,
/var/named/example.org.db
/var/named/example.org.rev
/var/named/127.0.0.rev
if you would like to see them as well but any way here is the /etc/named.conf file; thanks

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;

dnssec-enable yes;
dnssec-validation yes;
dnssec-lookaside auto;

/* Path to ISC DLV key */
bindkeys-file "/etc/named.iscdlv.key";
};

logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
#The followingzone definitions don't need any modification. the first one
#is the definition of the root name servers and sets up our server as a
#caching-capable DNS server.
#the second one defines localhost.
#the third zone definition defines the reverse lookup for localhost.
#
#
zone "." IN {
type hint;
file "root.hints";
};
zone "localhost" in {
type master;
file "localhost.db";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.rev";
};
#the zone definition below is for the domain that our name server is
#authoritative for i.e. the example.org domain name.
#
zone "example.org" {
type master;
file "example.org.db";
};
#below is the zone for the in-addr.arpa domain, for the example.org site.
zone "15.2.0.10.in-addr.arpa" {
type master;
file "example.org.rev";
};
#BELOW IS THE ENTRy FOR THE SUB-DOMAIN FOR WhICH THIS SERvER IS A SLAVE SERVER
#ip address of sales.example.orgs master server is 192.168.1.2
zone "sales.example.org" {
type slave;
file "sales.example.org.bk";
masters {10.0.2.16;};
};
 
Old 12-10-2011, 11:59 AM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 476Reputation: 476Reputation: 476Reputation: 476Reputation: 476
@ Reply

malak33,

You're welcome.

Well if you are preparing for RHCSA and RHCE then you will not require much hands on DNS as of now. Both RHCSA and RHCE exam objectives does not include configuring primary name server. If you will check RHCE objectives it only require you to know how to configuring caching only DNS server.

I can understand it is quite tough to transition from Windows environment to Linux. I would suggest you to check syntax that you have used in your config files with the how to configure DNS link that I have posted in my previous post. DNS and DHCP both are fun to work with and it require a little more time and practice to get used to it.
 
Old 12-10-2011, 12:40 PM   #5
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Original Poster
Rep: Reputation: 3
T3RM1NVT0R,

wow, well that makes me feel a bit better about having problems with it then. In windows it is so easy to set up DHCP; a little tougher but still easy to set up DNS.

I will have to check it out when im not as frusterated, moving on to FTP and doing good. Do you know what else is covered in the exam for RHCSA? Ohh, and thanks for that link earlier by the way, i'll prob just go through that instead of the book i've been using. I have heard that the linux community is very helpful, already I'm starting to think that and quick responders too.
 
Old 12-10-2011, 01:36 PM   #6
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Quote:
dns_rdata_fromtext: 127.0.0.rev:7: near 'IN': extra input text
<--snip-->
dns_rdata_fromtext: example.org.rev:3: near '3H': not a valid number
If you want to fix your bind installation, take a look at line 7 of 127.0.0.rev and line 3 of example.org.rev
Or you can post the 2 zone files here (using CODE tags for better readability), so we could help you on this

Regards
 
1 members found this post helpful.
Old 12-10-2011, 02:41 PM   #7
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Original Poster
Rep: Reputation: 3
code tags?
 
Old 12-10-2011, 03:10 PM   #8
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Original Poster
Rep: Reputation: 3
i thought i saw what it was.... so i made some changes here is the new log file

Error in named configuration:

zone localhost/IN: loaded serial 2009123108

dns_rdata_fromtext: 127.0.0.rev:7: near 'IN': extra input text

zone 0.0.127.in-addr.arpa/IN: loading from master file 127.0.0.rev failed: extra input text

zone 0.0.127.in-addr.arpa/IN: not loaded due to errors.

_default/0.0.127.in-addr.arpa/in: extra input text

zone example.org/IN: loaded serial 2009123108

dns_rdata_fromtext: example.org.rev:7: near 'IN': syntax error

zone 15.2.0.10.in-addr.arpa/IN: loading from master file example.org.rev failed: syntax error

zone 15.2.0.10.in-addr.arpa/IN: not loaded due to errors.

_default/15.2.0.10.in-addr.arpa/IN: syntax error
 
Old 12-10-2011, 03:12 PM   #9
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Original Poster
Rep: Reputation: 3
here is the /var/named/example.org.db file

$TTL 1W
@ IN SOA ns1.example.org. root (
2009123108 ; serial
3H ; refresh
30M ; retry
20W ; expiry
1W) ; minimum
IN NS ns1.example.org.
IN NS ns2.example.org.
IN MX 10 smtp.example.org.
ns1 IN A 10.0.2.15 ;primary name server
ns2 IN A 10.0.2.16 ;secondary name server
serverA IN A 10.0.2.15
serverB IN A 10.0.2.16
smtp IN A 10.0.2.25 ;mail server
www IN CNAME serverA ;web server
ftp IN CNAME serverB ;ftp server
serverA IN TXT "Cell: 717-867-5309"

---------- Post added 12-10-11 at 03:12 PM ----------

here is the /var/named/example.org.rev file

$TTL 1W
@ IN SOA ns1.example.org.root (
2009123108 ; serial
10800 ; refresh
30M ; retry
2W ; expiry
1W ; minimum
IN NS ns1.example.org.
IN NS ns2.example.org.
1 IN PTR serverA.example.org. ; reverse info for serverA
2 IN PTR serverB.example.org. ; reverse info for serverB
25 IN PTR smtp.example.org. ; reverse for mailserver
 
Old 12-10-2011, 03:15 PM   #10
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Original Poster
Rep: Reputation: 3
here is the /var/named/localhost.db

$TTL 1W
@ IN SOA localhost root (
2009123108 ; serial
3H ; refresh
30M ; retry
2W ; expiry
1W) ; minumum
IN NS @
IN A 127.0.0.1
 
Old 12-10-2011, 03:16 PM   #11
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Original Poster
Rep: Reputation: 3
here is the /var/named/127.0.0.rev file

$TTL 1W
@ IN SOA localhost. root.localhost. (
2009123108 ; serial
3H ; refresh
30M ; retry
2W ; expiry
1W ; minimum
IN NS localhost.
IN PTR localhost.

thanks in advance guys; let me know if you need anything else from me... i think this is all of the files though
 
Old 12-10-2011, 05:04 PM   #12
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Hi,

You should enclose config files with CODE tags (use the # icon to get them), so the keep their formatting
Regarding the errors:
You miss the closing ")" in both zone files. And you need to specifically assign 1 as the PTR of localhost in 127.0.0.rev zone
Code:
$TTL 1W
@ IN SOA localhost. root.localhost. (
     2011121001 ; always increase the serial
     3H ; refresh
     30M ; retry
     2W ; expiry
     1W  ); minimum
     IN NS localhost.
1   IN PTR localhost.
In example.org.rev, you've also messed the SOA record:
Code:
$TTL 1W
@ IN SOA ns1.example.org. root.localhost.(
2011121001 ; always increase the serial
10800 ; refresh
30M ; retry
2W ; expiry
1W ); minimum
    IN NS ns1.example.org.
    IN NS ns2.example.org.
1 IN PTR serverA.example.org. ; reverse info for serverA
2 IN PTR serverB.example.org. ; reverse info for serverB
25 IN PTR smtp.example.org. ; reverse for mailserver
HTH

Last edited by bathory; 12-10-2011 at 05:06 PM.
 
2 members found this post helpful.
Old 12-10-2011, 05:19 PM   #13
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Original Poster
Rep: Reputation: 3
u da man

bathory,
you are awesome!! it fixed it and the text changed colors.
i have more errors though now.....
how do i post it on here so the text keep their colors?
i guess that is code tags?
should i just screen shot it??
thanks
 
Old 12-10-2011, 05:30 PM   #14
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 11,520

Rep: Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501Reputation: 1501
Just post the errors you get. We do not need the color text from you console
You can attach a screenshot if you like, though
 
Old 12-10-2011, 06:01 PM   #15
malak33
Member
 
Registered: Dec 2011
Location: Amish Country PA, USA
Distribution: CentOS 6.2
Posts: 104

Original Poster
Rep: Reputation: 3
screen shots of named error

here are the screen shots, you guys are the best.
THANKS
i uploaded it to this website with screenshots because it is easier, here is the link

http://www.slideshare.net/malak33/named-troubleshooting
let me know if you have any problems, i never used this site before
 
  


Reply


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] CentOS Bind Problems MartinPrestovic Linux - Networking 6 11-11-2010 09:06 AM
creating domain name in bind problems exposing bind to internal network abhijit_mohanta Linux - Networking 1 09-03-2009 02:09 AM
creating domain name in bind problems exposing bind to internal network abhijit_mohanta Linux - Security 1 09-03-2009 02:01 AM
Problems with BIND on CentOS 5.1 ostashenp Linux - Networking 2 03-04-2008 10:55 AM


All times are GMT -5. The time now is 02:44 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration