[CentOS] Configuring BIND to answer to two domain names (four IP addresses)

Fri Sep 24 17:38:47 UTC 2010
Les Mikesell <lesmikesell at gmail.com>

On 9/24/2010 12:21 PM, Dotan Cohen wrote:
>> Have a read for the listen on directive for BIND which tells BIND what
>> interfaces/IP Addresses to bind to.
> Thanks, I am aware that Apache can be told to listen only to specific
> addresses. Can BIND be told to listen on all addresses? Your post
> implies that this is the default (which makes sense, as so does
> Apache), maybe I am chasing a non-issue?
> In other words, I should configure BIND to answer to exampleA.com and
> to exampleB.com with no regard to IP addresses. then in the control
> panel for each domain name configure the nameservers to my liking
> (with addresses that the server answers to, naturally)? That's it?
>>   Alternatively, you could just configure BIND identically on both machines and ensure that
>> they are setup in a master/slave configuration so that each name server could answer
>> requests for both domains and publish both name server records in each domain.
> There is only one machine. All four addresses point to it.

You are making it much more complicated than necessary. I'd configure 
apache to use named virtual hosts and listen on all addresses (but you 
might want to tie https to specific addresses so you can tie connections 
to the right certificates), and bind to listen on all addresses and 
answer for all your domains.

   Les Mikesell
    lesmikesell at gmail.com