0

For the purpose of installing some clustered product, I had to setup an internal DNS server. I'm running CentOS and bind9. I'm aiming for domain name "mydomain.local" and the machine the DNS server is running on is "master" (172.16.154.10). Other machines in the cluster are "node1" (.11) and "node2 (.12).

The DNS config seems to be fine, as I can host master, host node1 or host node2 from any of the machines and answers seem to be fine.

Now, the install script queries for machine names (in a way that I can't control) and for some reason comes up with e.g. node1.mydomain.local.localdomain. Note the extra .localdomain part which happens to be the default you'd find in files like /etc/resolv.conf and the like.

Indeed, at first, commands like hostname or domainname would return localhost.localdomain and localdomain respectively. So I changed those (using the setting version of those e.g. domainname mydomain.local) but to no avail.

Any idea where those could come from? I should add those machines are all VMs running inside VMware fusion.

resolv.conf:

# Generated by NetworkManager
domain mydomain.local
search mydomain.local

nameserver 172.16.154.10  # <-- my 'master' machine
nameserver 172.16.154.2   # <-- NAT address of my VMware Fusion host

named.conf:

//
// named.conf
//
// Provided by Red Hat bind package to configure the ISC BIND named(8) DNS
// server as a caching only nameserver (as a localhost DNS resolver only).
//
// See /usr/share/doc/bind*/sample/ for example named configuration files.
//

options {
//  listen-on port 53 { 127.0.0.1; };
//  listen-on-v6 port 53 { ::1; };
    directory   "/var/named";
    dump-file   "/var/named/data/cache_dump.db";
        statistics-file "/var/named/data/named_stats.txt";
        memstatistics-file "/var/named/data/named_mem_stats.txt";
//  allow-query     { localhost; };
    allow-query { any; };
    recursion yes;

    dnssec-enable yes;
    dnssec-validation yes;
    dnssec-lookaside auto;

    /* Path to ISC DLV key */
    bindkeys-file "/etc/named.iscdlv.key";

    managed-keys-directory "/var/named/dynamic";
};

logging {
        channel default_debug {
                file "data/named.run";
                severity dynamic;
        };
};

zone "." IN {
    type hint;
    file "named.ca";
};


zone "mydomain.local" {
        type master;
        file "mydomain.local.fwd";
};

// 172.16.154.10
zone "154.16.172.in-addr.arpa" {
        type master;
        file "mydomain.local.rev";
};

include "/etc/named.rfc1912.zones";
include "/etc/named.root.key";

mydomain.local.rev:

$ORIGIN 154.16.172.in-addr.arpa.

$TTL 3D

@       SOA     master.mydomain.local.     root.mydomain.local. (12 4h 1h 1w 1h)

@       IN      NS      master.mydomain.local.

10     IN      PTR     master.mydomain.local.
11     IN      PTR     node1.mydomain.local.
12     IN      PTR     node2.mydomain.local.

mydomain.local.fwd:

$ORIGIN mydomain.local.

$TTL 3D

@       SOA     master.mydomain.local.     root.mydomain.local. (12 4h 1h 1w 1h)

@       IN      NS      master.mydomain.local.

master.mydomain.local.     IN      A       172.16.154.10
node1.mydomain.local.   IN  A   172.16.154.11
node2.mydomain.local.   IN  A   172.16.154.12

1 Answer 1

0

I have no idea but you can find yourself with a recursive grep of localdomainin /etc. For instance, with ack-grep:

% sudo ack-grep localdomain /etc 
[result here]

You will find which file still contains the string localdomain.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .