Solved

adding dns subdomain on exisiting ubuntu bind server

Posted on 2011-09-24
5
671 Views
Last Modified: 2012-05-12
i have dns working on an ubunut server for one domain and would like to add a subdomain. (ie, test.example.com)

i added the new domain in named.conf.local and created the .db file in /etc/bind/zones but i cant get it to resolve. i can find guides on how to create the initials domain but none about adding multiple domains to one server.
0
Comment
Question by:msidnam
  • 3
  • 2
5 Comments
 
LVL 21

Accepted Solution

by:
Papertrip earned 500 total points
ID: 36594069
Unless you have a good reason to create a separate zone file for a subdomain (like allowing certain slaves to have just the subdomain instead of the entire domain), then just add them into your existing zone file and make your life easier.

Example:
If you need to add a record for 'www.domain.com', you just add the A record as www
If you need to add a record for www.subdomain.domain.com, you just add the A record as www.subdomain

That of course assumes the $ORIGIN is set properly.  Speaking of $ORIGIN, you can use that to achieve the same results and there is really no trade-off by doing it either way.

Let's say that right now you have this in your zonefile:
$ORIGIN domain.com.
www A 1.2.3.4

Open in new window

That translates into www.domain.com
$ORIGIN subdomain.domain.com.
www A 4.3.2.1

Open in new window

That translates into www.subdomain.domain.com

Make sense?
0
 
LVL 2

Author Comment

by:msidnam
ID: 36594111
makes sense, but i've never come across the $ORIGIN tag before.
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36594113
$ORIGIN is in every zone, whether you see it or not ;)

http://www.zytrax.com/books/dns/ch8/origin.html
0
 
LVL 2

Author Comment

by:msidnam
ID: 36594186
that worked great. thank you.

i'm thinking of putting the subdomain on a different network. would i need to so anything other than add a nic to the dns server and make sure it can connect to the other network?
0
 
LVL 21

Expert Comment

by:Papertrip
ID: 36594224
Technically you don't even need to add a physical nic, you can just create a virtual.  But either way yeah just make sure connectivity works between subnets and you should be fine as long as your 'listen-on' option in named.conf includes that interface.
0

Featured Post

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Update 21-May-2015: I temporarily removed the source code and the code snippets to make major changes to the program. Regards, Joe INTRODUCTION This Article is a follow-up to the Article entitled How To Rename-Move a Batch of PDF Files Based o…
Occasionally you run into the website or two that will not resolve properly using your own DNS servers.  Some people simply set up global forwarders for their DNS server.  I don’t recommend doing this because it can cause problems resolving addresse…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question