LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   dns server configuration to add new domain (https://www.linuxquestions.org/questions/linux-server-73/dns-server-configuration-to-add-new-domain-808757/)

bakrynor 05-19-2010 12:31 AM

dns server configuration to add new domain
 
Hi
assume hhffll.com is domain A.
assume hhffll.net is domain B.
and
assume Ubuntu DNS server IP address is 1.2.3.4

domain A is the first domain on my DNS server.

content of named.conf.local is[“/etc/bind/named.conf.local”] :

Code:

zone "hhffll.com" {
            type master;
            file "/etc/bind/db.hhffll.com";
    };
    zone "3.2.1.in-addr.arpa" {
            type master;
            file "/etc/bind/db.3.2.1";
    };

then I:
create file “ db.hhffll.com “ on “/etc/bind/” Directory
and
file “ db.3.2.1 “ on “/etc/bind/” Directory

what I have to do to make domain B work properly on same DNS server?
Thanks a lot.

bathory 05-19-2010 02:02 AM

Hi,

Add the new zone in named.conf.local:
Code:

zone "hhffll.net" {
            type master;
            file "/etc/bind/db.hhffll.net";
    };

And create the new zone file (/etc/bind/db.hhffll.net) containing the RRs for the new domain.

Regards

bakrynor 05-19-2010 04:03 AM

Quote:

Originally Posted by bathory (Post 3973688)
containing the RRs for the new domain.

thank you for your response,
Do you mean put the info of reverse zone of domain B at zone file "db.hhffll.net"?
if not what about reverse zone of domain B?
Thank you.

bathory 05-19-2010 04:14 AM

You cannot have 2 reverse zones for the same IPs. I.e. the IP 1.2.3.4 must resolve to one host, either it's from the domain hhffll.com or from hhffll.net.

bakrynor 05-19-2010 04:55 AM

Then to make domain B work, Do I need a second IP, no other way?
I have web server and as you know, by using virtual host more than one site it can work.
but how to make dns server point to second site.
I.e
when request domain A >>>>>>>> first site appear.
when request domain B >>>>>>>> second site appear.
Thank you in advance.

bathory 05-19-2010 05:09 AM

You don't need a 2nd IP
You can use the same IP for different domains/hosts, like
Code:

hhffll.com. IN A 1.2.3.4
and
Code:

hhffll.net IN A 1.2.3.4
Then when you setup vhosts on your web server, it will show the appropriate site, based on the request that was made

Regards

bakrynor 05-19-2010 06:20 AM

Then I have to modify only one file "/etc/bind/named.conf.local":
Code:

zone "hhffll.com" {
            type master;
            file "/etc/bind/db.hhffll.com";
    };

zone "hhffll.net" {
            type master;
            file "/etc/bind/db.hhffll.net";
    };


    zone "3.2.1.in-addr.arpa" {
            type master;
            file "/etc/bind/db.3.2.1";
    };

and I have to create new zone file "/etc/bind/db.hhffll.net":

Code:

$TTL 6H
@      IN      SOA ns1.hhffll.net.    admin.hhffll.net. (
                        1              ;serial number
                        8H            ;refresh
                        2H            ;retry
                        4W            ;expiration
                        1D )          ;
;
                NS      ns1
;
@      IN      NS            ns1.hhffll.net.
@      IN      A      1.2.3.4
ns1    IN      A      1.2.3.4

And as you say no way for reverse zone. I have to restart dns service.
Is this wright way?
if not Please advice me.
thank you in advance

bathory 05-19-2010 06:30 AM

Yes, this is all you have to do.

Regards

bakrynor 05-19-2010 06:37 AM

Thank you very much my friend.
Now I get the Idea.

dinakumar12 05-19-2010 08:22 AM

Hi,

Also check this blog,which i have created for configuring multiple domains in ubuntu http://dinakumar12.wordpress.com

bakrynor 05-19-2010 10:37 AM

Thanks that what I need exactly.
You and bathory, are give me great help.


All times are GMT -5. The time now is 05:44 PM.