Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th July 2010, 17:22
theleech1 theleech1 is offline
Junior Member
 
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default name server and dns not working properly

Hi,

I used the The Perfect Server - CentOS 5.5 x86_64 [ISPConfig 3] using Bind and Chroot. I got it all to install fine by changing the x64 to i386 where necessary. BUT I am getting this error - Error in named configuration:
/etc/named.conf.local:1: zone 'xyz.com': already exists previous definition: /var/named/chroot/etc/named.conf.local:1

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

I bought a domain. xyz.com from enom. I added a name server at the registry to my IP address of 83.1.1.1.1 (not real but looks better than x.x.x!)

on my machine in my basement behind a firewall I have Bind, Apache, the lot on 192.168.2.9.

I have got Ispconfig working but have made a mess of something because i want to use xyz.com as both a ns1 on my local machine and also to use it as a www but the ns1.xyz.com does not dig or resolve . Later I will add wxyz.com to this when I get it working.

My trouble is that the ns1 is not working. when I run ...named restart I get this error -

Quote:
[root@server1 ~]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named:
Error in named configuration:
/etc/named.conf.local:1: zone 'xyz.com': already exists previous definition: /var/named/chroot/etc/named.conf.local:1
[FAILED]
Now those files are sylinked as part of chroot.

When I remove the DNS Zone under DNS I get this:

Quote:
[root@server1 ~]# /etc/init.d/named restart
Stopping named: [ OK ]
Starting named: [ OK ]
Now here are my settings under dns-dns zone after I add a dns dzone using the DEFAULT wizard.


Quote:
DNS Zone
Template - Default
Server - server1.example.com <- I have changed this previously to server1.xyz.com all over the place but have changed it back.
Client - leave empty
Domain - xyz.com
IP Address - 83.1.1.1.1 <- I have also tried my internal ip of 192.168.2.1
NS 1 - ns1.xyz
NS 2 - ns2.someothercompany.com
Email - email@email.com
Create DNS Record Cancel
(dont know how to embed screenshots or I would have done that.

Now as this is a template it does create these when you go in and look. and yes it does put the "." after the .com
Quote:
A xyz.com. 192.168.2.9 0
A mail 192.168.2.9 0
A www 192.168.2.9 0
MX xyz.com. mail.xyz.com. 10
NS xyz.com. ns1.xyz.com. 0
NS xyz.com. ns2.another company.com. 0
So even if I delete it and created it with 83.1.1.1 (with the correct IP) it still gives the error.


I am sure if I can sort this out then I can get it all to work

Thanks for helping in advance.

Last edited by theleech1; 8th July 2010 at 22:38. Reason: more info and clean up formatting
Reply With Quote
Sponsored Links
  #2  
Old 9th July 2010, 08:26
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,334 Times in 4,184 Posts
Default

Must be a problem with the named chroot setup. Post the content of the file /var/named/chroot/etc/named.conf.local and the output of:

ls -la /etc/named.conf.local

which guide did you follow to install a chrooted named?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 9th July 2010, 08:58
theleech1 theleech1 is offline
Junior Member
 
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Till,

Thanks for trying to help. You are a champion and I see you help everyone

Your answers:

/var/named/chroot/etc/named.conf.local - I just changed the domain to xyz below thats all.

Quote:
dzone "xyz.com" {
type master;
file "/var/named/chroot/var/named/pri.xyz.com";
};

ls -la /etc/named.conf.local


Quote:
[root@server1 install]# ls -la /etc/named.conf.local
lrwxrwxrwx 1 root named 39 Jul 8 22:06 /etc/named.conf.local -> /var/named/chroot//etc/named.conf.local
[root@server1 install]#
I have noticed this "//" whenever i link to the chroot. I have not seen it when I ahve done it elsewhere. but maybe thats a special Chroot thing - I was trying to look intot hat but try putting "//" into Google!

Also I have only created 1 user "root" and I had to change the permissions on "named" to allow root. Otherwise I have followed all this -

http://www.howtoforge.com/perfect-se...ispconfig-3-p5 entry 17-

Quote:
17 Install A Chrooted DNS Server (BIND9)

To install a chrooted BIND9, we do this:

yum install bind-chroot

Then do this:

chmod 755 /var/named/
chmod 775 /var/named/chroot/
chmod 775 /var/named/chroot/var/
chmod 775 /var/named/chroot/var/named/
chmod 775 /var/named/chroot/var/run/
chmod 777 /var/named/chroot/var/run/named/
cd /var/named/chroot/var/named/
ln -s ../../ chroot
cp /usr/share/doc/bind-9.3.6/sample/var/named/named.local /var/named/chroot/var/named/named.local
cp /usr/share/doc/bind-9.3.6/sample/var/named/named.root /var/named/chroot/var/named/named.root
touch /var/named/chroot/etc/named.conf.local
vi /var/named/chroot/etc/named.conf
Quote:
//
// 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 { 127.0.0.1; };
listen-on-v6 port 53 { ::1; };
directory "/var/named/chroot/var/named";
dump-file "/var/named/chroot/var/named/data/cache_dump.db";
statistics-file "/var/named/chroot/var/named/data/named_stats.txt";
memstatistics-file "/var/named/chroot/var/named/data/named_mem_stats.txt";
allow-query { localhost; };
recursion yes;
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
zone "." IN {
type hint;
file "named.root";
};
include "/var/named/chroot/etc/named.conf.local";
chkconfig --levels 235 named on
/etc/init.d/named start

BIND will run in a chroot jail under /var/named/chroot/var/named/. I will use ISPConfig to configure BIND (zones, etc.).
There is something very fishy here
Reply With Quote
  #4  
Old 12th July 2010, 08:58
theleech1 theleech1 is offline
Junior Member
 
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Solved

I played with it over the weekend and solved it myself.

It was the Bind-chroot install that got messed up plus something in the named.comf that was used here that did not work on my vmware version.

I removed the whole bind and installed it again. then the original problem here was solved.

the next problem was that it just did not work....! So I went and used a very simple named.conf from one of my other servers. There is one of the settings in this tutorial that did not work on the vmware.

I am not going to research it further as this was just a wekeend project to install Centos on a vmserver on my main machine for fun... and it was but i burnt alot of hours on it.. glad the weather was perfect for playing on the computer.
Reply With Quote
  #5  
Old 12th July 2010, 10:22
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,334 Times in 4,184 Posts
Default

If you want to setup a production system with ispconfig 3, I can highly recommend to use debain. Centos causes a lot more problems then debian installs.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 12th July 2010, 10:41
theleech1 theleech1 is offline
Junior Member
 
Join Date: Jul 2010
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

thanks Till. This was just a weekend project. The reason I decided to play with Centos is that I **thought** most of the BIG web hosting companies around the world use Centos.....

i know it is like do you prefer a BMW to an Audi...

But in this case it seemed that Centos won by a mile.

anyway this project was just for fun and I might use it to host a few familyblog.com type sites.. so who cares if they are offline for the weekend while I play with a new setup.

this machine is in the basement on a wireless connection so it cant be used for anything but.... if someone out there wants me to host their site on this then I will do it for $1,000 per month
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Centos5.4/ISPConfig 3--Virtual site not working MichaelCaditz Installation/Configuration 25 25th March 2011 11:37
Can't Ping over VPN RoMiONeT Server Operation 2 4th July 2010 00:19
I don't recieve mail. privir Installation/Configuration 2 3rd June 2009 22:08
subdomain and mail relay configuration aranthorn Installation/Configuration 24 3rd September 2007 22:53
Unable send receive emails vassilis3 Installation/Configuration 15 19th May 2007 14:34


All times are GMT +2. The time now is 07:01.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.