BIND Configuration Check

19 posts / 0 new
Last post
#1 Wed, 07/11/2007 - 02:09
GamillahSol

BIND Configuration Check

Ok, I am feeling like an idiot because I have a problem I can't seem to solve and I can't find any mention of it in the docs or in the forums. I've installed Virtualmin and when I run the "Re-check and refresh configuration" it comes back with a message:

"Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page."

What does this mean? Where is the "list of DNS servers" it's referring to? Any help or point in the right direction would be most helpful.

Thanks, Michael

Wed, 07/11/2007 - 09:53
Joe
Joe's picture

Hey Michael,

What platform is this on? The install is supposed to set that up for you, but I guess I didn't roll out the latest version for one or more platforms.

To fix it:

In the Webmin menu browse to Networking:Network Configuration.

Click "Hostname and DNS Client".

In the DNS Servers list, move the first entry down and add 127.0.0.1 to the field.

Save it.

Then re-check the config.

This is so that lots of local "look at" or "edit" functions for new websites work even before DNS has propagated for a new domain. Like the WYSIWYG editor, and the "View website through Webmin" option.

--

Check out the forum guidelines!

Wed, 07/11/2007 - 17:35 (Reply to #2)
GamillahSol

That was it! Thank you so much! This is a CentOS 5 box.

Tue, 12/11/2007 - 18:09 (Reply to #3)
DanLong

reboot the server and forcr BIND to reinitialize

Fri, 02/08/2008 - 15:29 (Reply to #4)
thorndike

I have to say, I am having the same issue.

I am on a Debian 4.0 box with VM professional. When I input 127.0.0.1 in the DNS field, I lose my net connectivity completely. When I do an Ifconfig, the system only shows 127.0.0.1 and no connections for eth0 or eth1.

When I reboot, the system comes up, but then I have the DNS error again.

I am new to this so I may need a bit of hand holding.

Also, are there any documents that can show me how all of this ties together? DNS is my weak point and I want to make sure that I understand all the ins and outs of DNS. For instance, at what point do I need to move DNS to a separate server from VM?

Thanks,

Robert

Wed, 03/05/2008 - 04:42 (Reply to #5)
fallendevil

ok the easy way is to go to webmin and add the lo interface to the list of dns servers.................
but if like myself you get all your dns info from your router or dhcp server then this dns settings in resolve.conf will just be overwriten via the network restart (via the dhclient-script) command.

To solve this type the below in a shell:

vi /sbin/dhclient-script

once in the vi window - add the following line to the script:

echo nameserver 127.0.0.1 >> $rscf

This will sort out the DNS problem by adding the 127 address to the resolve.conf everytime the script runs. (which is ewverytime the network restarts).

Hope this reaches the people whi have this issue.

Tue, 05/20/2008 - 10:31 (Reply to #6)
velvetpixel

On CentOS 5.1 I do not have the dhclient-script file in sbin.

I too am having any changes made to resolve.conf through webmin Hostname and DNS Client page lost at system reboot.

What do I need to manually edit to keep my changes? :)

Tue, 05/20/2008 - 15:47 (Reply to #7)
Joe
Joe's picture

<div class='quote'>What do I need to manually edit to keep my changes? :)</div>

Don't use dhcpd to set them, or add them to the dhcpd configuration. Dynamic IPs aren't terribly convenient for servers.

--

Check out the forum guidelines!

Tue, 05/20/2008 - 15:59 (Reply to #8)
velvetpixel

But I don't have any dynamic anything. I am in a DC on an OC-148 not in my basement (not that there is anything wrong with being in a basement!:)

All IPs are static on my setup.

It's just when I reboot that the data in resolve.conf is overwritten. This is probably not a Virtualmin issue so I will ask over at the CentOS forums and over at the OpenVZ forums. I have a felling now that this is an OpenVZ issue :(

Tue, 05/20/2008 - 11:16 (Reply to #9)
ronald
ronald's picture

In the Webmin menu browse to Networking:Network Configuration.

Click &quot;Hostname and DNS Client&quot;.

In the DNS Servers list, move the first entry down and add 127.0.0.1 to the field.
In my system I also have two IP's - nameservers - given by my datacenter next to the 127.0.0.1

If your system has the IP xx.xxx.xx.xxx then this needs to be found on the net.
Your ISP has 2 nameservers that you need to fill in there as their nameservers are pointing to your machines IP.. The datacenter should give you those IP's

If at home behind a router, then look in your router to find the 2 nameservers and add those to your machine. At least this is how my setup looks like and it is working.

Tue, 05/20/2008 - 11:25 (Reply to #10)
velvetpixel

Thanks ronald but you did not read my question.

I know how to use the Webmin Hostname and DNS Client page.

The problem is edits to the resolve.conf using that page are lost on reboot so everytime the system is rebooted I have to remember to manually re-add 127.0.0.1 to keep Virtualmin happy :)

Tue, 05/20/2008 - 16:14 (Reply to #11)
ronald
ronald's picture

velvetpixel, sorry 'bout that, I was actually replying to the original poster.
However I see now this thread is a year old LOL (sort of).
I wasn't paying enough attention to it.
hope you get your issue solved though

Tue, 05/20/2008 - 16:19 (Reply to #12)
velvetpixel

Thanks ronald! :)

If I find any answers I will post them back here.

Sun, 02/01/2009 - 17:15 (Reply to #13)
jerico2day

I have centOS 5.2 running on my home network behind a router. I added &quot;echo nameserver 127.0.0.1 &gt;&gt; $rscf&quot; to the first line in /sbin/dhclient-script but it doesn't appear to work.

I also tried adding 127.0.0.1 on the first line in the config screen, it restarts (doesn't freeze like in Debian), but it still doesn't take.

What to do now?

Mon, 02/02/2009 - 21:15 (Reply to #14)
jerico2day

Wonderful. That took care of it! Thanks!

Wed, 09/19/2007 - 15:11
mark2010

Phew that worked for me :)

Tue, 12/11/2007 - 03:22
Joe
Joe's picture

Hello,

I followed this instruction but it did not work
Still have this message ???

<div class='quote'>&quot;Virtualmin is configured to setup DNS zones, but this system is not setup to use itself as a DNS server. Either add 127.0.0.1 to the list of DNS servers, or turn off the BIND feature on the module config page.&quot;</div>

???

But dns server and my domains seems to work fine.

/nils

--

Check out the forum guidelines!

Sun, 06/07/2009 - 07:37
fallendevil

ok its 5.2 i use and the config goes like this

/sbin/dhclient-script
[code:1]

make_resolv_conf() {
if [ &quot;${PEERDNS}&quot; == &quot;no&quot; ]; then
return
fi

if [ x$reason == xRENEW ] &amp;&amp;
[ &quot;$new_domain_name&quot; == &quot;$old_domain_name&quot; ] &amp;&amp;
[ &quot;$new_domain_name_servers&quot; == &quot;$old_domain_name_servers&quot; ]; then
return;
fi

if [ -n &quot;$new_domain_name&quot; ] || [ -n &quot;$new_domain_name_servers&quot; ]; then
cp -fp /etc/resolv.conf /etc/resolv.conf.predhclient
rscf=`mktemp /tmp/XXXXXX`;
echo '; generated by /sbin/dhclient-script' &gt; $rscf
if [ -n &quot;$SEARCH&quot; ]; then
echo search $SEARCH &gt;&gt; $rscf
else
if [ -n &quot;$new_domain_name&quot; ]; then
echo search $new_domain_name &gt;&gt; $rscf
fi
fi
for nameserver in $new_domain_name_servers; do
echo nameserver $nameserver &gt;&gt; $rscf
echo nameserver 127.0.0.1 &gt;&gt; $rscf
done
change_resolv_conf $rscf
rm -f $rscf
fi
}

notice where the 127.0.0.1 address is, find this point in your script and do the same.
I only added the line with 127.0.0.1 on it.
If you just put it on the first line - then it will get over written.
do it as above and try it

FD [/code:1]

Tue, 02/03/2009 - 10:37
fallendevil

Thanks for replying back, Really glad it fixed your problem.

FD

Topic locked