Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )



Advanced DNS Management
New ZoneEdit. New Managment.

FREE DNS Is Back

Sign Up Now
 
Reply to this topicStart new topic
> Setting Up 2nd Master Domain In Bind 9
bkesting
post Mar 13 2004, 11:52 AM
Post #1


Whats this Lie-nix Thing?
*

Group: Members
Posts: 4
Joined: 2-May 03
Member No.: 767



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.
Go to the top of the page
 
+Quote Post
hughesjr
post Mar 13 2004, 12:56 PM
Post #2


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



For the zone file for new domain do this:
CODE
zone "newdomain.com" {
       type master;
       file "/var/named/chroot/var/named/newdomain.com";
};

(your file line might be different ... whatever the file line is for mydomain.com ... replace mydomain.com with newdomain.com)

Where ever you put the file newdomain.com (in the file line) ... go there and create a file (named newdomain.com ... note for RHEL I would be in the file /var/named/chroot/var/named/newdomain.com ... your location might be different). Here is what I would try:
CODE
$TTL 43200
newdomain.com IN SOA ns.mydomain.com. root.newdomain.com. (
                            2003010617; serial
                            300; refresh
                             60; retry
                        1209600; expire
                          43200; minimum
                                )
                        NS ns.mydomain.com.
                           
newdomin.com.   A       xxx.xxx.xxx.xxx
ftp             CNAME   newdomin.com.
mail            CNAME   newdomin.com.
www             CNAME   newdomin.com.


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
bkesting
post Mar 13 2004, 01:24 PM
Post #3


Whats this Lie-nix Thing?
*

Group: Members
Posts: 4
Joined: 2-May 03
Member No.: 767



I will give it a shot.......thanks for the info.

Will I have to add anything to to zone statement of mydomain.ocm? Also, if this is setup correctly, will my local machine (same one as the nameserver is on) be able to resolve this new domain right away?

Thanks again.
Go to the top of the page
 
+Quote Post
hughesjr
post Mar 13 2004, 03:41 PM
Post #4


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



No, you shouldn't need to add anything to the MYDOMAN domain ....

stop and restart the named service after you finish .... /etc/init.d/named restart in RH / Fedora...

If you are pointed to ms.mydomain.com for your DNS yes ... but to be safe, just do the command:

nslookup

that will put you at the nslookup prompt ... enter the command:

server ns.mydomain.com <--substitute your real DNS server name

then enter the name you want to look up ... ie

www.newdomain.com


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post
bkesting
post Mar 13 2004, 04:50 PM
Post #5


Whats this Lie-nix Thing?
*

Group: Members
Posts: 4
Joined: 2-May 03
Member No.: 767



Everything is working great now...........both domains are resolving. Thanks for all of your help.
Go to the top of the page
 
+Quote Post
hughesjr
post Mar 13 2004, 04:57 PM
Post #6


Its GNU/Linuxhelp.net
*******

Group: Admin
Posts: 3,433
Joined: 25-July 03
From: Corpus Chrsiti, TX, USA
Member No.: 1,151



your welcome.... smile.gif


--------------------
Johnny Hughes
hughesjr@linuxhelp.net
Enterprise Alternatives: CentOS, WhiteBoxEL
Favorite Workstation Distros (in order): CentOS, Gentoo, Debian Sarge, Ubuntu, Mandrake, FedoraCore, Slackware, SUSE
Favorite Server Distros (in order): CentOS, WhiteBoxEL, Debian Sarge, Slackware, Mandrake, FedoraCore, Gentoo, SUSE
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



RSS Lo-Fi Version Time is now: 21st October 2017 - 08:02 PM