Solved

adding dns subdomain on exisiting ubuntu bind server

Posted on 2011-09-24
5
676 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Want Experts Exchange at your fingertips?

With Experts Exchange’s latest app release, you can now experience our most recent features, updates, and the same community interface while on-the-go. Download our latest app release at the Android or Apple stores today!

Question has a verified solution.

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

This article is in response to a question here (http://www.experts-exchange.com/Other/URLs/Q_28283850.html) at Experts Exchange. The Original Poster has a scanned signature and wants to make the background transparent so that the signature may be pl…
I've written instructions for one router type, but this principle may be useful for others of the same brand and even other brands of router. Problem: I had an issue especially with mobile devices that refused to use DNS information supplied via…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

622 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