LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-17-2006, 04:15 AM   #1
talat
Member
 
Registered: Jan 2006
Distribution: Centos
Posts: 145

Rep: Reputation: 16
Question DNS configuration issue ??


Dear All

I need to change the database directory for my zone files from default /var/named .For example forward lookup files should be placed in some other directory like /var/named/fwd and reverse lookup files in some other directory /var/named/rev ,and few critical domains file in seperate directory like /var/named/critical .

Can some one guide me how to do that.

Thanks in advance

Regard
Talat
 
Old 11-17-2006, 04:52 AM   #2
4ajaysingh
LQ Newbie
 
Registered: Nov 2006
Posts: 29

Rep: Reputation: 15
Hi,

Yes, u can change your default location. Change the file derictive option in named.conf and specify your desired location.

Hope it wil do what you want.

******** Enjoy *****
Ajay (India)
 
Old 11-17-2006, 05:58 AM   #3
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,167
Blog Entries: 1

Rep: Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038Reputation: 2038
Leave the directory option as is in your named.conf, e.g
Code:
 directory "/var/named";
and then in your zones definition do something like:
Code:
zone "A" {
        type master;
        file "fwd/A.zone";
};

zone "A.rev" {
        type master;
        file "rev/A.zone";
};

zone "criticalA" {
        type master;
        file "critical/criticalA";
 
Old 11-17-2006, 08:01 AM   #4
talat
Member
 
Registered: Jan 2006
Distribution: Centos
Posts: 145

Original Poster
Rep: Reputation: 16
Thanks Allot buddies

Regard
Talat
 
Old 11-26-2006, 11:05 AM   #5
talat
Member
 
Registered: Jan 2006
Distribution: Centos
Posts: 145

Original Poster
Rep: Reputation: 16
Dear Friends

This time i am trying to seperate all the zone definations from named.conf.For example all the forward lookup zones definations should be in the
/etc/zonedef/zones.def

All the reverse lookup defination in
/etc/zonedef/rev.def
All the customer related zonedef in
/etc/zonedef/customer.def

I am trying to do this by placing following lines in named.conf

include "/etc/zonedef/zones.def";
include "/etc/zonedef/rev.def";
include "/etc/zonedef/customer.def";

But when i start the service i get following error


[root@localhost etc]# service named start
Starting named: /etc/named.conf:26: open: /etc/zonedef/zones.def: file not found
Nov 26 22:02:18.790 starting BIND 9.2.4 -g
Nov 26 22:02:18.791 using 1 CPU
Nov 26 22:02:18.796 loading configuration from '/etc/named.conf'
Nov 26 22:02:18.797 listening on IPv4 interface lo, 127.0.0.1#53
Nov 26 22:02:18.798 listening on IPv4 interface eth0, 172.16.1.200#53
Nov 26 22:02:18.802 command channel listening on 127.0.0.1#953
Nov 26 22:02:18.802 ignoring config file logging statement due to -g option
Nov 26 22:02:18.803 couldn't open pid file '/var/run/named/named.pid': Permission denied
Nov 26 22:02:18.803 exiting (due to early fatal error)
Error in configuration file /etc/named.conf : [FAILED]



Although the file zones.def is there at the specified location.I even change the owner ship of the file to named:named ,even change the permision to 777 but no use.
As soon as i comment out the last three lines of


//include "/etc/zonedef/zones.def";
//include "/etc/zonedef/rev.def";
//include "/etc/zonedef/customer.def";

It start without any error.

Can some body help me in this

Regard
Talat
 
Old 11-27-2006, 01:33 PM   #6
talat
Member
 
Registered: Jan 2006
Distribution: Centos
Posts: 145

Original Poster
Rep: Reputation: 16
Guys

I search this error on the web allot.After that i found when i run the cmd

#named -u named

Bind start working but due to it i have to place my zone files in /var/named instead of /var/named/chroot/var/named.Which means it runs bind out of chroot jail.Thats not good .I have to run it in chroot. Any clue

Regard
Talat
 
Old 11-28-2006, 03:23 PM   #7
talat
Member
 
Registered: Jan 2006
Distribution: Centos
Posts: 145

Original Poster
Rep: Reputation: 16
Guys Any clue????

I am stuck at this point.Please any clue can help

Regard
Talat
 
Old 11-28-2006, 04:14 PM   #8
chort
Senior Member
 
Registered: Jul 2003
Location: Silicon Valley, USA
Distribution: OpenBSD 4.6, OS X 10.6.2, CentOS 4 & 5
Posts: 3,660

Rep: Reputation: 76
Do you understand what chroot does? It changes where / is for that process. If named is chroot'd into /var/named, it can't get to /etc. /var/named/etc is the new /etc. You need to put your include files in /var/named/etc.
 
Old 11-29-2006, 12:15 PM   #9
talat
Member
 
Registered: Jan 2006
Distribution: Centos
Posts: 145

Original Poster
Rep: Reputation: 16
Dear Chort

Thanks allot man.It solved my problem ,i am realy thankfull to you.God bless you

Regard
Talat
 
  


Reply

Tags
chroot, named, zone files



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
DNS configuration immortaltechnique Red Hat 7 02-01-2013 08:46 AM
DNS configuration issue vesperatus Linux - Networking 4 09-14-2005 03:49 PM
DNS configuration ?? xedios Linux - Software 6 12-23-2004 01:59 PM
DNS issue or caching issue? AZDAVE Linux - Networking 7 10-02-2004 12:28 AM
DNS Configuration doulos Linux - General 1 02-15-2002 02:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

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

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
Open Source Consulting | Domain Registration