LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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
 
Search this Thread
Old 03-15-2011, 09:42 AM   #1
showe123
Member
 
Registered: Aug 2010
Posts: 58

Rep: Reputation: 0
cname save issues system-config-bind


Hi-

Im new here to the forums and hopefully someone can help me with an issue...I'm trying to create a cname in system-config-bind. I can create the record but when I go to save it I get a "Zone file save error". Here's the full output:

Save of Zone file var/named/chroot/var/named/plantsareperfect.com.db failed
dns_master_load_/var/named/chroot/var/named/plantsareperfect.com.db:10lantsareperfect.com:cname and other data (sorry, the rest is off the page and I cant see it)

Any ideas why I can't save this cname?

Thank you for any help.
 
Old 03-15-2011, 12:08 PM   #2
jon2kx
Member
 
Registered: Aug 2004
Location: North Carolina
Distribution: Ubuntu, Red Hat, Solaris, HP-UX, FreeBSD.
Posts: 63

Rep: Reputation: 24
Wink Needs a zone file editor to save this information

You need to use a zone file editor to save this information, this most popular one is DNS-zone editor, free and open source
 
Old 03-15-2011, 06:02 PM   #3
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,962

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Hi,

This looks like a permissions problem.
Run:
Code:
ls -l /var/named/chroot/var/named/
to see if you write have permissions on the zone files.
Also check if it's SELinux that prevents writing in that directory

Regards

Last edited by bathory; 03-15-2011 at 06:12 PM.
 
Old 03-16-2011, 12:41 AM   #4
tallship
Member
 
Registered: Jul 2003
Location: On the Beaches of Super Sunny Southern San Clemente, California USA
Distribution: Slackware - duh!
Posts: 520
Blog Entries: 3

Rep: Reputation: 112Reputation: 112
Exclamation

Or maybe you left off a period? What's happening on line 10?

When you cname, you've got fqdns on both sides, not just on one, or at least you have a hostname on the left and an fqdn on the right.

The hostname on the left side MUST have an A RR defined for it somewhere else in the zonefile (IOW, that host must be defined somewhere else in the zonefiles right side, with an A RR, if you will).

If you use an fqdn on the left, instead of the shorthand way of allowing BIND to append the zone by leaving out the trailing period, then make sure you use that period.

I'd start by looking there

I don't agree with a lot of Bernstein-isms, but I share his loathe of cname RRs and recommend that you just use A RRs instead.

If you wanna post the entire zonefile we might better be able to determine. Besides, as long as you don't restart named the old version of the zone will continue.

Hope that helps

.

Last edited by tallship; 03-16-2011 at 01:54 AM. Reason: fixed it.
 
Old 03-16-2011, 09:15 AM   #5
showe123
Member
 
Registered: Aug 2010
Posts: 58

Original Poster
Rep: Reputation: 0
Thanks for the feedback. I'm coming from a Mac OX Server background and I have extensive experience using DNS on that platform and what I noticed with BIND is, my A record points only to the domain name, not the machine name. In other words, in BIND, when you create an A record, it seems to only allow you to enter the domain name that is associated with the IP address, not the actual machine. In my example, I have a nameserver called vmware.plantsareperfect.com. Its my understanding that to define the IP that is associated with that machine you create an A record and point that IP to the machine. BIND doesn't seem to allow me to define the machine name. I do have the nameserver record created however.

I don't know if my Mac server background is causing my misunderstanding of DNS or what but it does seem to me that you can't create a cname until your A record points to a machine. What am I missing?

Thanks again for comments.
 
Old 03-16-2011, 09:58 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,962

Rep: Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341Reputation: 1341
Quote:
Its my understanding that to define the IP that is associated with that machine you create an A record and point that IP to the machine. BIND doesn't seem to allow me to define the machine name. I do have the nameserver record created however.
It's not bind problem. I guess it's the system-config-bind tool that does not allow this action
You can edit the zone file by hand and use:
Code:
plantsareperfect.com. IN A x.x.x.x
vmware.plantsareperfect.com. IN A x.x.x.x
 
Old 03-16-2011, 08:14 PM   #7
tallship
Member
 
Registered: Jul 2003
Location: On the Beaches of Super Sunny Southern San Clemente, California USA
Distribution: Slackware - duh!
Posts: 520
Blog Entries: 3

Rep: Reputation: 112Reputation: 112
Quote:
Originally Posted by showe123 View Post
I don't know if my Mac server background is causing my misunderstanding of DNS or what but it does seem to me that you can't create a cname until your A record points to a machine. What am I missing?

Thanks again for comments.
Again, I hate cnames, but you don't actually need an A RR in the zonefile if the cname points to a hostname outside the zone - i.e., another domain.

hm...

Well, for starters, follow bathory's model above and you should be fine (using A records instead of cname records). cnames just increase recursion unnecessarily and you can assign as many A RRs as you want to the same IP address anyway.

Now I don't even know how to copy a floppy on a Mac, and prolly never will, but there's a couple of things I can mention, expanding upon bathory's example of a well formed set of records.

first, don't forget those periods!

Second, you can use *shorthand*, if you like, which means that you could just put the hostname on the left with no period and then BIND will append the zone.

i.e.,:

Code:
vmware IN A x.x.x.x
Note there is no period. BIND will append the zone so that "vmware" is now "vmware.plantsareperfect.com." for you.

but if you do a

Code:
vmware.plantsareperfect.com IN A x.x.x
Then you're going to end up with the following hostname:

vmware.plantsareperfect.com.plantsareperfect.com.

When in doubt - do it longhand.

Third, if your nameserver is going to be in the same domain as the zone you're editing (Not the best approach), then you're going to need an NS RR as well as an A RR for the host that is the nameserver.

To be rfc compliant, there should be a glue record for the nameserver.

Finally, if you're nameserver is outside the zone - say, you use ns1.jomama.com, then all you need in this particular case is an NS record for the nameserver.

I hope that helps, Oh! and also... welcome to LQ

Last edited by tallship; 03-16-2011 at 08:27 PM.
 
  


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
bind and cname skoinga Linux - Server 6 12-10-2010 10:21 AM
system-config-bind unable to save grob115 Linux - Server 3 08-22-2010 03:59 AM
system-config-bind issues jessicaK Linux - Server 4 03-18-2008 11:03 AM
Bind CNAME Problem CleonII Linux - Software 1 11-01-2005 10:27 AM
system-config-bind -- save error labMonkey Linux - Networking 0 01-26-2005 02:42 PM


All times are GMT -5. The time now is 01:50 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