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

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



Thank you for all the help so far. To conclude:
I have one physical server that answers to the following IP addresses:
1.1.1.1
1.1.1.2
1.1.1.3
1.1.1.4

I need 1.1.1.1 & 1.1.1.2 to be the name servers for exampleA.com, and
1.1.1.3 & 1.1.1.4 to be the nameservers for exampleB.com. I have these
files:

# cat /etc/named.conf

options {
        directory "/etc";
        pid-file "/var/run/named/named.pid";
        listen-on {
                any;
                };
        };

zone "." {
        type hint;
        file "/etc/db.cache";
        };

zone "exampleA.com" {
        type master;
        file "/var/named/exampleA.com.hosts";
        };
zone "exampleB.com" {
        type master;
        file "/var/named/exampleB.com.hosts";
        };



# cat /var/named/exampleA.com.hosts

$ORIGIN exampleA.com.
$TTL 1h
exampleA.com. IN      SOA     ns1.exampleA.com. ns2.exampleA.com. (
                        1; Serial - increment me
                        10800
                        3600
                        604800
                        38400 )
exampleA.com. IN      NS      ns1.exampleA.com.
exampleA.com. IN      NS      ns2.exampleA.com.
exampleA.com. IN      A       1.1.1.1
exampleA.com. IN      A       1.1.1.2



# cat /var/named/exampleB.com.hosts

$ORIGIN exampleB.com.
$TTL 1h
exampleB.com. IN      SOA     ns1.exampleB.com. ns2.exampleB.com. (
                        1; Serial - increment me
                        10800
                        3600
                        604800
                        38400 )
exampleB.com. IN      NS      ns1.exampleB.com.
exampleB.com. IN      NS      ns2.exampleB.com.
exampleB.com. IN      A       1.1.1.3
exampleB.com. IN      A       1.1.1.4



How does that look?

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