LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-19-2010, 12:31 AM   #1
bakrynor
LQ Newbie
 
Registered: May 2010
Posts: 6

Rep: Reputation: 0
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.
 
Old 05-19-2010, 02:02 AM   #2
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,894

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
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
 
Old 05-19-2010, 04:03 AM   #3
bakrynor
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by bathory View Post
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.
 
Old 05-19-2010, 04:14 AM   #4
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,894

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
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.
 
Old 05-19-2010, 04:55 AM   #5
bakrynor
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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.
 
Old 05-19-2010, 05:09 AM   #6
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,894

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
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
 
Old 05-19-2010, 06:20 AM   #7
bakrynor
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
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
 
Old 05-19-2010, 06:30 AM   #8
bathory
Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 10,894

Rep: Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322Reputation: 1322
Yes, this is all you have to do.

Regards
 
Old 05-19-2010, 06:37 AM   #9
bakrynor
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Thank you very much my friend.
Now I get the Idea.
 
Old 05-19-2010, 08:22 AM   #10
dinakumar12
Member
 
Registered: Mar 2010
Location: INDIA (chennai)
Distribution: centos
Posts: 268
Blog Entries: 7

Rep: Reputation: 18
Hi,

Also check this blog,which i have created for configuring multiple domains in ubuntu http://dinakumar12.wordpress.com
 
1 members found this post helpful.
Old 05-19-2010, 10:37 AM   #11
bakrynor
LQ Newbie
 
Registered: May 2010
Posts: 6

Original Poster
Rep: Reputation: 0
Lightbulb

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


Reply

Tags
domain


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
DNS server for new domain helpmhost Linux - Networking 2 08-07-2009 03:28 PM
I have only one domain, do i need DNS Server? demia Linux - Server 5 05-04-2009 04:27 PM
How to add two domain on DNS server (not subdomain) AK007HK Linux - Server 8 07-05-2008 12:29 AM
How to add new domain to an existing qmail-ldap server Niceman2005 Linux - Software 1 06-07-2006 08:30 PM
Traceroute, Ping, Domain Name Server (DNS) Lookup, WHOIS, and DNS Records Lookup netoknet General 1 05-09-2005 03:43 AM


All times are GMT -5. The time now is 10:49 PM.

Main Menu
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