Solved

adding dns subdomain on exisiting ubuntu bind server

Posted on 2011-09-24
5
666 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Update 21-May-2015: I temporarily removed the source code to make major changes to the program. Regards, Joe INTRODUCTION This article presents a solution to a question (http://www.experts-exchange.com/Programming/Installation/Q_28396542.html)…
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 fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

777 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