Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am trying to set up a simple local DNS server to use across multiple virtual machines in a dev/test environment (web servers). While I would just set up a Windows server with DNS, I have limited memory available so I would rather just run BIND on my host OS (Widows XP Pro).

I found this great tutorial that got me up and running with BIND on a single domain. After the setup I was able to use my knowledge of DNS control panels that I am used to to set up a few records. Unfortunately, the assumption in the tutorial was that I would only want to manage DNS for one domain and I have two domains.

I have been through tons of documentation and I have tried duplicating the zone file and copying and pasting the "zone" section in named.conf, but that didn't work. I also tried putting the other domain's records right into my original zone file without success. Following the example, my zone file currently looks like this:

$TTL 6h
@   IN SOA  ns1.mydomain.com.   info.mydomain.com. (
            2011052302
            10800
            3600
            604800
            86400 )

@       NS  ns1.mydomain.com.

ns1 IN A    10.225.0.51

test    IN A    10.225.0.1

$ORIGIN test.mydomain.com.
www IN A    10.225.0.1
www2    IN A    10.226.0.66

This currently resolves for:

  1. test.mydomain.com
  2. www.test.mydomain.com
  3. www2.test.mydomain.com

I need to also make the server resolve:

  1. test.myotherdomain.com
  2. www.test.myotherdomain.com
  3. ftp.test.myotherdomain.com

I am not interested in how many ways it can be achieved or best practices (this is a test enovironment), I am just trying to find 1 way to get it to resolve records for both mydomain.com and myotherdomain.com. If it can be done in 1 zone file, that is fine. If it requires multiple zone files, please explain how to configure them (following the tutorial I linked to) so they will be read by BIND.

Update

Through more tinkering and help from you guys I discovered where I went horribly wrong - I was having conflicts with the public DNS because both mydomain.com and myotherdomain.com are online. I had the file structure and named.conf set up correctly before. However, I had to set up my local DNS to be authoritive for test.mydomain.com and test.myotherdomain.com (vs mydomain.com and myotherdomain.com) and then put in the A records only for the "test" subdomain.

$TTL 6h

@   IN SOA  ns1.test.mydomain.com.  info.mydomain.com. (
            2011052304
            10800
            3600
            604800
            86400 )

@       NS  ns1.test.mydomain.com.

ns1 IN A    10.225.0.51
www IN A    10.225.0.171
db  IN A    10.225.0.171
ftp IN A    10.225.0.171
share|improve this question
    
If ever a question screamed out for an RTFM answer this is it! If you've "been through tons of documentation" I can only suggest doing it again and this time reading it properly. –  John Gardeniers May 23 '11 at 12:25
    
He's stuck using bind -if there is a manual page that explains this why not post the link. it's not his fault he thinks windows will use more ram - he's a developer. –  Jim B Jun 2 '11 at 4:02
    
Actually, it is the fact that I need to run multiple virtual machines that eats up the RAM, not because I am running BIND. I am using bind because Windows XP Pro doesn't include DNS. –  NightOwl888 Jun 3 '11 at 19:10
add comment

2 Answers 2

up vote 3 down vote accepted

Add another zone entry, similar to the existing one in the named.conf file, with the DNS name and file name of your second domain.

share|improve this answer
add comment

When you create another zone in Bind, you add another section to named.conf and point it to another data file (db.test.myotherdomain.com).

share|improve this answer
1  
And since SF is for professional admins, your question is likely to be closed as off topic. –  Ward May 23 '11 at 5:27
1  
Why would you automatically assume I am not being paid for this (I am) just because I know nothing about setting up BIND? It just so happens I am a developer full-time and an admin part-time. –  NightOwl888 May 23 '11 at 10:33
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.