Re: Configuring BIND to answer to two domain names (four IP addresses)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Fri, Sep 24, 2010 at 19:49, James A. Peltier <jpeltier@xxxxxx> wrote:
> BIND has listen on directives as well, but if this is a single box configuration
> it's not necessarily required as it will listen on all interfaces.
>

Yes, I actually do want it to listen on all addresses (only one NIC),
I don't know why I thought that it had to be explicitly configured.


> As far as configuring the domains, well that's pretty simple. In your DNS records for each
> domain you would define NS records such as this
>
> $TTL 1d
> @ Â Â Â Â Â Â Â IN Â Â ÂSOA Â Â ns1.exampleA.com. hostmaster.exampleA.com. (
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â2010092401 Â Â Â; PUT SEQUENCE NUMBER HERE (YYYY/MM/DAY/CHANGE #)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â3600 Â Â Â Â Â Â; Refresh every hour
>                Â600       ; Retry  - every ten minutes
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â604800 Â Â Â Â Â; Expire Â- after one week
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1h ) ; Minimum 1H
> Â Â Â Â Â Â Â ÂIN Â Â ÂNS Â Â Âns1.exampleA.com.
> Â Â Â Â Â Â Â ÂIN Â Â ÂNS Â Â Âns2.exampleA.com.
>
> ;; Hosts Section
>
> ns1 Â Â IN Â Â A Â Â 1.1.1.1
> ns2 Â Â IN Â Â A Â Â 1.1.1.2
> www   IN   A   1.1.1.3
>
> Keep in mind that you don't need A records for the NS records if you are pointing to a different name server so your exampleB your records might look like this
>
>
> $TTL 1d
> @ Â Â Â Â Â Â Â IN Â Â ÂSOA Â Â ns1.exampleB.com. hostmaster.exampleB.com. (
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â2010092401 Â Â Â; PUT SEQUENCE NUMBER HERE (YYYY/MM/DAY/CHANGE #)
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â3600 Â Â Â Â Â Â; Refresh every hour
>                Â600       ; Retry  - every ten minutes
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â604800 Â Â Â Â Â; Expire Â- after one week
> Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1h ) ; Minimum 1H
> Â Â Â Â Â Â Â ÂIN Â Â ÂNS Â Â Âns1.exampleA.com.
> Â Â Â Â Â Â Â ÂIN Â Â ÂNS Â Â Âns2.exampleA.com.
>
> ;; Hosts Section
>
> www       1.1.1.4
>
> Notice that the NS records point to ns1 and ns2.exampleA.com.
>

That is quite the point: I need the nameservers for exampleA.com and
exampleB.com to be different!


> Notice the A records for www.example{A,B} which should match your
> Apache instances if you are doing IP based hosting. ÂIf you are doing
> name based hosting you *could* DNS round robin the requests.
>

If the nameservers are for specific addresses, and Apache serves based
on FQDN as opposed to based on address, then I think that Apache can
answer on all addresses.


> Master and Secondary DNS configurations are defined in your
> named.conf file. ÂThis doesn't matter in your necessarily for your
> configuration, but thought I would point it out.
>
>
> On the master
>
> zone "examplea.com" {
> Â Â Â Âtype master;
> Â Â Â Âfile "zone.examplea.com";
> Â Â Â Âallow-transfer { ns2.examplea.com }
> };
>
>
> On the secondary
>
> zone "examplea.com" {
> Â Â Â Âtype slave;
> Â Â Â Âmasters { ns1.examplea.com };
> Â Â Â Âfile "zone.example.com";
> };
>
>

Thanks. I will do another for exampleB.com as well, to keep them separate.

-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos



[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux