Need help with DNS

Chris Buxton cbuxton at
Tue Mar 25 19:26:01 UTC 2008

Men & Mice offers consulting services for jobs like this (and bigger  
ones, too, of course), but our rate is substantially more than $50/hour.

Basically, you need to do something like this:

Install BIND and the BIND chroot environment:

yum install bind bind-chroot

Optionally, also install the GUI for configuring BIND (if X and Gnome  
are installed):

yum install system-config-bind

Create named.conf. If you have system-config-bind installed, in the  
Gnome toolbar (at the top of the GUI screen), go to System >  
Administration > Server Settings > Domain Name System. It will create  
a basic config, which you can then modify using either the GUI or a  
text editor.

If you don't have that tool, start with these commands:

rndc-confgen -a -b 256 -c /var/named/chroot/etc/rndc.key
ln -sv /var/named/chroot/etc/rndc.key /etc/

cat > /var/named/chroot/etc/named.conf << EOF
options {
	directory "/var/named";
	allow-recursion { localnets; };
include "/etc/rndc.key";
controls {
	inet * allow { localhost; } keys { rndckey; };
zone "." {
	type hint;
	file "root.hint";
zone "localhost" {
	type master;
	file "localhost";
ln -sv /var/named/chroot/etc/named.conf /etc/

dig +norec > /var/named/chroot/var/named/root.hint

cat > /var/named/chroot/var/named/localhost << EOF
\$TTL 1d
@ SOA @ root 42 1h 1h 1w 1h
   NS @

Now start adding zones to your configuration. For example (continuing  
to use cat rather than a text editor, for simplicity):

cat >> /etc/named.conf << EOF
zone "" {
	type master;
	file "";

cat > /var/named/chroot/var/named/ << EOF
\$TTL 1d
@	SOA (
		2008032500 1d 1h 1w 1h )
mx1	A
ns1	A
www	A

When you think you're done, use this command:

named -u named -t /var/named/chroot -g

That will actually load everything and start the name server, but in  
the foreground where you can easily see any error messages. Type  
control-c to stop it. If there were any errors, go back and fix them,  
then try it again. When all is ready, use these commands:

chkconfig named on
service named start

Chris Buxton
Professional Services
Men & Mice

On Mar 25, 2008, at 11:36 AM, Bob Hoffman wrote:
> running linux, cnetos 5.1 (redhat enterprise).
> I think I have read everything under the sun. I bought the remaining  
> '1 in
> stock' of almost every book on bind on The only  
> remaining one is
> pro bind/dns and that is coming tomorrow.
> I am pretty sure it is down to just the named.conf, a zone file or  
> DB (there
> is confusion among the books), may or may not have to deal with  
> resolve and
> hosts files, and there is the recursvie,/non-recursive.iter/cach- 
> nocache
> thing going on.
> The problem lies, as I am finding with most linux things, the  
> information
> available is usually for business class servers and networks, not  
> just for
> simple old webservers.
> Add to it that the majority of webserver owners are using managed  
> hosting
> you have very little online for the specific webserver master.
> Willing to pay pronto for walk through...anyone please...
> Making it work is probably possible for me as I pod along, but  
> 'making it
> work' is not the smae as 'making it work and be secure and correct'.
>  _____
> From: Mike Ragusa [mailto:mragusa at]
> Sent: Tuesday, March 25, 2008 2:30 PM
> To: Bob Hoffman
> Cc: bind-users at
> Subject: Re: Need help with DNS
> What operating systems are you currently trying to run bind on?
> Have you googled for a basic BIND howto such as
> On Tue, Mar 25, 2008 at 2:20 PM, Bob Hoffman <bob at>  
> wrote:
> Hi, willing to pay for help.
> I have read book after book and still cannot figure where to start or
> exactly what to do.
> Most books are for networks and this is driving me crazy.
> I cannot find anyone to hire to help me.
> Situation.....
> I have built a webserver and am testing it at home. It will be  
> colocated in
> the future, but at the moment, no sites are pointing at it. It is a
> standalone webserver and nothing will be linked to it (except the  
> internet).
> I would like it to have its own nameserver for the 3 or four sites I  
> am
> putting on it.
> At home, in testing, I would like the nameserver set up and working  
> for
> resolve issues of virtual host and the like.
> For the colo, I believe only a few settings would have to be changed  
> to go
> from the home to the colo (such as ip addresses and the like)
> 50 an hour. Doubt this should take more than 3 hours. The extra time  
> in the
> three hours can be spent going over a few security issues regarding  
> DNS.
> This is just a standalone server. I have a lot of books on this, but  
> nothing
> seems to deal with just a basic nameserver and the actual files you  
> need to
> adjust. Each book talks about everything all at once and many are  
> <gasp>
> contradicting each other.
> Just shoot me please.
> bob at

More information about the bind-users mailing list