LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices



Reply
 
Search this Thread
Old 03-12-2004, 11:20 PM   #1
bkesting
Member
 
Registered: Mar 2004
Location: Nebraska
Distribution: SuSE, RedHat
Posts: 36

Rep: Reputation: 15
Adding a 2nd domain to Bind 9.2.2 on Linux


Hi, I am running BIND 9.2.2 on a linux box with one domain and it is runniing perfectly. A buddy of mine would like me to host a website for him on my box too. He has purchased the domain and entered the nameserver of my box as the authoritative nameserver for his new domain. We will call my domain mydomain.com and nameserver is ns.mydomain.com. I am not quite sure how to setup his domain in my nameserver, I will reference it as newdomain.com. I have setup an entry in named.conf for newdomain.com and set it as a master......i am just not sure with how to write the zone file for newdomain.com.

I have tried several things, but nothing seems to be working. Here are my zone files:

1) this is for mydomain.com (working) (xxx.xxx.xxx.xxx is the same IP for both domains)

$ORIGIN .
$TTL 43200
mydomain.com IN SOA ns.mydomain.com. root.mydomain.com. (
2003010612 ; serial
300 ; refresh
60 ; retry
1209600 ; expire
43200 ; minimum
)
NS ns.mydomain.com.
A xxx.xxx.xxx.xxx
MX 5 mail.mydomain.com.
$ORIGIN mydomain.com.
mail A xxx.xxx.xxx.xxx
ns A xxx.xxx.xxx.xxx
www A xxx.xxx.xxx.xxx

2) this is what i have tried (unsuccesfully) for the new domain

$ORIGIN .
$TTL 43200
newdomain.com IN SOA ns.mydomain.com. root.newdomain.com. (
2003010617 ; serial
300 ; refresh
60 ; retry
1209600 ; expire
43200 ; minimum
)
IN NS ns.mydomain.com.
IN A xxx.xxx.xxx.xxx
www IN A xxx.xxx.xxx.xxx

Does this look right for the second zone? Any help would be appreciated. Thanks in advance.
 
Old 03-13-2004, 05:12 PM   #2
bkesting
Member
 
Registered: Mar 2004
Location: Nebraska
Distribution: SuSE, RedHat
Posts: 36

Original Poster
Rep: Reputation: 15
I figured out my problem on my own.
 
Old 04-05-2004, 02:31 PM   #3
AZDAVE
Member
 
Registered: Aug 2003
Posts: 82

Rep: Reputation: 15
What was the solution. I am having a similuar problem.
 
Old 04-05-2004, 03:51 PM   #4
bkesting
Member
 
Registered: Mar 2004
Location: Nebraska
Distribution: SuSE, RedHat
Posts: 36

Original Poster
Rep: Reputation: 15
It is not too hard. Make sure that you have both domains entered in named.conf as type master. Then setup a zone file for each. The second zone file will look almost identical to the first except that all the nameserver references will point back to the first domain. For example, the namerserver for domain2 is ns.domain1.com. You should be able to follow these examples to get you going. You will need to have your domain names registered with the nameserver of your first domain with whomever you bought your domain from. If you have any questions, let me know.

DOMAIN #1

$ORIGIN .
$TTL 43200
domain1.com IN SOA ns.domain1.com. root.domain1.com. (
2003010612 ; serial
300 ; refresh
60 ; retry
1209600 ; expire
43200 ; minimum
)
NS ns.domain1.com.
A xxx.xxx.xxx.xxx
MX 5 mail.domain1.com.
$ORIGIN domain1.com.
mail A xxx.xxx.xxx.xxx
ns A xxx.xxx.xxx.xxx
ftp A xxx.xxx.xxx.xxx
www A xxx.xxx.xxx.xxx


DOMAIN #2

$ORIGIN .
$TTL 43200
domain2.com IN SOA ns.domain1.com. root.domain2.com. (
2003010620 ; serial
300 ; refresh
60 ; retry
1209600 ; expire
43200 ; minimum
)
NS ns.domain1.com.
A xxx.xxx.xxx.xxx

$ORIGIN domain2.com.
www CNAME domain2.com.
ftp CNAME domain2.com.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Cant get entry in bind to work with domain.com instead of www.domain.com pxes351 Linux - Networking 12 05-09-2005 07:20 AM
adding 2nd domain or website spooge Linux - Networking 1 02-26-2004 09:59 AM
Adding 2nd Linux to LILO froedi Linux - Newbie 11 12-31-2003 06:34 AM
adding win 2000 server domain controller, bind dns GraemeK Linux - Networking 6 08-23-2003 06:44 PM
adding linux RH7.1 to domain reetu Linux - Networking 1 11-13-2001 04:55 AM


All times are GMT -5. The time now is 12:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration