Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 24th May 2009, 00:58
devaparvata devaparvata is offline
Junior Member
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default BIND configuration for mirror sites

I have 2 registered domains let's say domain1.com and domain2.com

On Ubuntu Server 8.04.2, it is installed bind9.

I configured bind for domain1.com and it works perfect. Here are the configuration files.
/etc/bind/named.conf.local
/etc/bind/db.domain1.com
/etc/bind/db.192

Quote:
/etc/bind/named.conf.local
Code:
zone "domain1.com" {
type master;
file "/etc/bind/db.domain1.com";
        };

zone "86.168.192.in-addr.arpa" {
        type master;
        notify no;
        file "/etc/bind/db.192";
};


Quote:
/etc/bind/db.domain1.com
Code:
;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns.domain1.com. root.domain1.com. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.domain1.com.
@       IN      A       192.168.86.10

Quote:
/etc/bind/db.192
Code:
;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns.domain1.com. root.domain1.com. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.
10      IN      PTR     ns.domain1.com.


These are all as standard configuration, nothing tricky.

For domain2.com I made some changes (as bold)

Quote:
/etc/bind/named.conf.local
Code:
zone "domain1.com" {
type master;
file "/etc/bind/db.domain1.com";
        };

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

zone "86.168.192.in-addr.arpa" {
        type master;
        notify no;
        file "/etc/bind/db.192";
};

QUOTE]/etc/bind/db.domain2.com
[/QUOTE]

Code:
;
; BIND data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns.domain2.com. root.domain2.com. (
                              1         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.domain2.com.
@       IN      A       192.168.86.10

Quote:
/etc/bind/db.192
Code:
;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns.domain1.com. root.domain1.com. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.
10      IN      PTR     ns.domain1.com.

$TTL    604800
@       IN      SOA     ns.domain2.com. root.domain2.com. (
                              3         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.
10      IN      PTR     ns.domain2.com.

However it does not work. In
Quote:
/var/log/daemon.log
Code:
dns_master_load: /etc/bind/db.192:26: 86.168.192.in-addr.arpa: multiple RRs of singleton type
zone 86.168.192.in-addr.arpa/IN: loading from master file /etc/bind/db.192 failed: multiple RRs of singleton type
zone domain1.com/IN NS 'ns1.domain1.com" has no address records (A or AAAA)
zone domain1.com/IN: loaded serial 1
running
zone domain1.com/IN: sending notifies (serial 1)
client XX.XXX.XXX.XXX#61563: query (cache) 'domain2.com/A/IN' denied
unexpected RCODE (REFUSED) resolving 'domain2.com/A/IN': XX.XXX.XXX.XXX#53
...
Can anyone help what how should I configure bind to host one site with two different hostnames?

Last edited by devaparvata; 24th May 2009 at 09:51.
Reply With Quote
Sponsored Links
  #2  
Old 24th May 2009, 20:16
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
Default

Quote:
Originally Posted by devaparvata View Post
Code:
;
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns.domain1.com. root.domain1.com. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.
10      IN      PTR     ns.domain1.com.

$TTL    604800
@       IN      SOA     ns.domain2.com. root.domain2.com. (
                              3         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.
10      IN      PTR     ns.domain2.com.

However it does not work.
This looks wrong.
Code:
; BIND reverse data file for local loopback interface
;
$TTL    604800
@       IN      SOA     ns.domain1.com. root.domain1.com. (
                              2         ; Serial
                         604800         ; Refresh
                          86400         ; Retry
                        2419200         ; Expire
                         604800 )       ; Negative Cache TTL
;
@       IN      NS      ns.
10      IN      PTR     ns.domain1.com.
shold be enough.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 24th May 2009, 21:23
devaparvata devaparvata is offline
Junior Member
 
Join Date: May 2009
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I changed the BIND reverse data however nothing changes...
Reply With Quote
  #4  
Old 25th May 2009, 13:02
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,744 Times in 2,577 Posts
 
Default

What's the error message now?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
All my mail is going to /var/mail/vmail _sluimers_ Installation/Configuration 21 10th January 2011 13:21
Ubuntu Hardy chrooted bind9 fails to start Djamu Server Operation 35 21st April 2010 08:28
The system is currently updating the configuration files. warlock General 8 21st February 2009 18:15
Problem on restart bind9 satimis Server Operation 6 30th October 2007 02:01
Bind-Chroot-Howto (Debian) spaz HOWTO-Related Questions 5 9th March 2006 14:50


All times are GMT +2. The time now is 08:03.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.