Solved

adding dns subdomain on exisiting ubuntu bind server

Posted on 2011-09-24
5
654 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
Comment Utility
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
Comment Utility
makes sense, but i've never come across the $ORIGIN tag before.
0
 
LVL 21

Expert Comment

by:Papertrip
Comment Utility
$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
Comment Utility
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
Comment Utility
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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

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…
Resolve DNS query failed errors for Exchange
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
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 …

743 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now