BIND on CentOS: Nameservers for two domains

Dotan Cohen dotancohen at gmail.com
Mon Sep 27 08:42:03 UTC 2010


Hello, I am trying to configure a single CentOS 5 machine as a server
for two unrelated websites:
example.eu
example.de

The server has four IP addresses assigned to it:
1.1.1.136
1.1.1.171
1.1.1.172
1.1.1.188

I plan on hosting example.eu on this server with these two IP
addresses for its name servers:
1.1.1.136 - ns1.example.eu
1.1.1.188 - ns2.example.eu

Likewise, I plan on hosting example.de on this server with these two
IP addresses for its name servers:
1.1.1.171 - ns1.example.de
1.1.1.172 - ns2.example.de

These are my relevant configuration files:

[root at CentOS-55-32-minimal ~]# 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 "example.de" {
        type master;
        file "/var/named/example.de.hosts";
        };
zone "example.eu" {
        type master;
        file "/var/named/example.eu.hosts";
        };



[root at CentOS-55-32-minimal ~]# cat /var/named/example.eu.hosts
$ORIGIN example.eu.
$TTL 86400
example.eu. IN      SOA     ns1.example.eu. ns2.example.eu. (
                        5; Serial - increment me
                        10800
                        3600
                        604800
                        38400 )
       IN  NS    ns1.example.eu.
       IN  NS    ns2.example.eu.
       IN  A     1.1.1.136
       IN  A     1.1.1.188
www    IN  A     1.1.1.136
www    IN  A     1.1.1.188
ns1    IN  A     1.1.1.136
ns2    IN  A     1.1.1.188



[root at CentOS-55-32-minimal ~]# cat /var/named/example.de.hosts
$ORIGIN example.de.
$TTL 86400
example.de. IN      SOA     ns1.example.de. ns2.example.de. (
                        5; Serial - increment me
                        10800
                        3600
                        604800
                        38400 )
       IN  NS    ns1.example.de.
       IN  NS    ns2.example.de.
       IN  A     1.1.1.171
       IN  A     1.1.1.172
www    IN  A     1.1.1.171
www    IN  A     1.1.1.172
ns1    IN  A     1.1.1.171
ns2    IN  A     1.1.1.172


In BIND and in the registrar control panel for example.eu I had set
the IP addresses originally to 1.1.1.171 and to 1.1.1.172, however due
to a technical problem with the .de domain I later changed the
configuration to 1.1.1.136 and 1.1.1.188 (because it turns out that
.de domains cannot have the two nameservers on the same C block, and
only the 171 and 172 addresses I can swap for another address).
However, even though the registrar control panel is set to
ns1.example.eu as 1.1.1.136 and ns2.example.eu as 1.1.1.188, I still
see this in whois:

[root at CentOS-55-32-minimal ~]# whois example.eu
// snip irrelevant lines
Nameservers:
        ns1.example.eu (1.1.1.171)
        ns2.example.eu (1.1.1.172)

I last made changes to the BIND configuration and to the registrar
control panel on Friday, 2010-9-24 which was three days ago. Therefore
I do not suspect that DNS propagation time is the issue here. Of
course, I also increased the serial line in the zone files when those
files changed. What am I missing, or what might I have done wrong?

Thank you in advance.


-- 
Dotan Cohen

http://gibberish.co.il
http://what-is-what.com



More information about the bind-users mailing list