I am setting up dns servers on Centos 5.2 using yum to install bind. The version of bind is 9.3.4-P1 according to dig.
I have followed this tutorial as a baseline: Bet you want to setup a DNS server huh? - Dev Shed
(Apologies if I missed anything major in doing this and my problems are down to my own mistakes)
So, I have /etc/named.conf /etc/rndc.conf and /etc/rndc.key
However, when starting named.conf I get
open: /etc/named.conf: invalid file
When running rndc reload i get connection failed: 127.0.0.1#953: connection refused.
I have run chown to set all 3 files as named:named.
Any ideas why I get these errors?
Thanks a lot :)
If you taken backup of your named.conf, restore it and try to restart named without configuring anything.
Pleae paste your dns configuration file here so we can suggest you something. Its very unusal tell something without looking at conf file.
Unless you start service rndc wont work. so will get connection failed error.
Are you sure this is not setup in a chroot env?
Thanks, I have posted the content of the 3 files here: cl1p.net
-rwxr-xr-x 1 named named 3848 Jul 29 15:16 named.conf
-rwxr-xr-x 1 named named 661 Jul 25 23:15 rndc.conf
-rwxr-x---1 named named 140 jul 25 21:26 rndc.key
just changed ROOTDIR="/var/named/chroot/" to ROOTDIR="/var/named/"
now I get "Locating /var/named//etc/named.conf failed" though
- Change it to /var/named only.
- Is you named.conf present there at /var/named/etc/named.conf location.
ok, I changed it to /var/named only
the file is there, I created a symbolic link and then ran chown on that dir.
I am getting the same msg back about invalid file.
edit: I am also still getting connection refused when i reload rndc
Can you ping your loopback ip address internally or do you get a similar error?