Solved

Host not found: 3(NXDOMAIN)

Posted on 2014-07-23
5
2,392 Views
Last Modified: 2014-07-24
I've implemented samba4 as a Domain Controller / Active Directory on my Linux Slackware server. The DC/AD stuff seems to work well enough so far, however it does want to update the DNS. I have implemented that and it seems to work ... sort of.

I have 1 XP and 1 WIN7 workstation connected to the domain named phonetree and hplaptop, respectively. Sometimes when I do `host hplaptop` it works fine and I get "hplaptop.hprs.local has address 192.168.0.100". Other times I'll get "Host hplaptop not found: 3(NXDOMAIN)". This is the state it is in now.

I haven't really been able to identify a pattern. I have been taking dhcpd, named and samba up and down while trying to configure my domain controller, and I've rebooted the server and client workstations serveral time, and released/renewed client dhcp connections. I haven't always checked between these events to see if the workstations are still reachable. In this case, I can't really think of anything I've done between when it worked and when it didn't except reboot the server. I've stopped and started samba, bind and dhcpd by hand serveral time since that seems to have worked in the past, but not at the moment.

Yes, the workstations are pingable and I can log into the domain from the workstations and ipconfig [/release|/renew] does seem to properly update on the server, example:
Jul 23 09:22:59 mail named[4180]: client 192.168.0.2#10807: updating zone '0.168.192.in-addr.arpa/IN': deleting rrset at '100.0.168.192.in-addr.arpa' PTR
Jul 23 09:22:59 mail dhcpd: DHCPRELEASE of 192.168.0.100 from 00:25:b3:bf:f5:42 (hplaptop) via eth1 (found)
Jul 23 09:22:59 mail dhcpd: Removed reverse map on 100.0.168.192.in-addr.arpa.
Jul 23 09:22:59 mail dhcpd: DHCPDISCOVER from 00:25:b3:bf:f5:42 via eth1
Jul 23 09:23:00 mail dhcpd: DHCPOFFER on 192.168.0.100 to 00:25:b3:bf:f5:42 (hplaptop) via eth1
Jul 23 09:23:00 mail named[4180]: client 192.168.0.2#10807: updating zone '0.168.192.in-addr.arpa/IN': deleting rrset at '100.0.168.192.in-addr.arpa' PTR
Jul 23 09:23:00 mail named[4180]: client 192.168.0.2#10807: updating zone '0.168.192.in-addr.arpa/IN': adding an RR at '100.0.168.192.in-addr.arpa' PTR
Jul 23 09:23:00 mail dhcpd: DHCPREQUEST for 192.168.0.100 (192.168.0.2) from 00:25:b3:bf:f5:42 (hplaptop) via eth1
Jul 23 09:23:00 mail dhcpd: DHCPACK on 192.168.0.100 to 00:25:b3:bf:f5:42 (hplaptop) via eth1
Jul 23 09:23:00 mail dhcpd: Added reverse map from 100.0.168.192.in-addr.arpa. to hplaptop.hprs.local

Open in new window

What's going on and what can I do to fix this once and for all? I don't really even know what logs or configs to post to help on this.
0
Comment
Question by:jmarkfoley
  • 4
5 Comments
 
LVL 10

Accepted Solution

by:
schaps earned 500 total points
ID: 40214402
To clarify, you are not using static DNS entries?
Also, are you doing the host lookups on the server or on a client? Are you sure that all devices are pointing their DNS lookups to your server IP?
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40215530
schaps: > To clarify, you are not using static DNS entries?

Samba has modified zone file heavily, but yes, there is a specific A record for the server itself, 192.168.0.2. Other than that, nothing statically defined except in the /etc/rc.d/rc.init1.conf network config file where eth0 is statically defined to 64.129.23.xxx and eth1 is statically defined to 192.168.0.2

Here is my current /etc/samba/private/dns/hprs.local.zone zone file:
$ORIGIN .
$TTL 604800     ; 1 week
hprs.local              IN SOA  mail.hprs.local. sysadmin.mail.hprs.local. (
                                2014072313 ; serial
                                172800     ; refresh (2 days)
                                14400      ; retry (4 hours)
                                3628800    ; expire (6 weeks)
                                604800     ; minimum (1 week)
                                )
                        NS      mail.hprs.local.
                        A       192.168.0.2
$ORIGIN hprs.local.
_kerberos               TXT     "HPRS.LOCAL"
$ORIGIN _tcp.Default-First-Site-Name._sites.dc._msdcs.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_ldap                   SRV     0 100 389 mail.hprs.local.
$ORIGIN _tcp.dc._msdcs.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_ldap                   SRV     0 100 389 mail.hprs.local.
$ORIGIN _msdcs.hprs.local.
_ldap._tcp.4ff5f387-a1c3-4263-8307-995314f69fb7.domains SRV 0 100 389 mail.hprs.local.
ed30cd52-6844-464b-9ced-52415cc982e9 CNAME mail.hprs.local.
gc                      A       192.168.0.2
$ORIGIN gc._msdcs.hprs.local.
_ldap._tcp.Default-First-Site-Name._sites SRV 0 100 3268 mail.hprs.local.
_ldap._tcp              SRV     0 100 3268 mail.hprs.local.
$ORIGIN _msdcs.hprs.local.
_ldap._tcp.pdc          SRV     0 100 389 mail.hprs.local.
$ORIGIN _tcp.Default-First-Site-Name._sites.hprs.local.
_gc                     SRV     0 100 3268 mail.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_ldap                   SRV     0 100 389 mail.hprs.local.
$ORIGIN _tcp.hprs.local.
_gc                     SRV     0 100 3268 mail.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_kerberos-master        SRV     0 100 88 mail.hprs.local.
_kpasswd                SRV     0 100 464 mail.hprs.local.
_ldap                   SRV     0 100 389 mail.hprs.local.
$ORIGIN _udp.hprs.local.
_kerberos               SRV     0 100 88 mail.hprs.local.
_kerberos-master        SRV     0 100 88 mail.hprs.local.
_kpasswd                SRV     0 100 464 mail.hprs.local.
$ORIGIN hprs.local.
mail                    A       192.168.0.2

Open in new window

> Also, are you doing the host lookups on the server or on a client?

The `host hplaptop` command mentioned in my initial post is on the samba server.

> Are you sure that all devices are pointing their DNS lookups to your server IP?

Pretty sure, I can just use the hostname when RDC'ing between XP and WIN7 client (e.g. phonetree, hplaptop). I don't have to use the IP or FQDN, though the Remote Desktop interface might be caching that information. It probably is caching because if I `ping phonetree` from hplaptop I get "*** Can't find address for server phonetree: Non-existent domain".

On the WIN7 workstations, nslookup gives:
C:\Users\Administrator.HPRS.000>nslookup
Default Server:  mail.hprs.local
Address:  192.168.0.2

Open in new window

ipconfig /displaynds give the following (plus dozens of additional entries for other domains):
    mail.hprs.local
    ----------------------------------------
    Record Name . . . . . : mail.hprs.local
    Record Type . . . . . : 1
    Time To Live  . . . . : 65550
    Data Length . . . . . : 4
    Section . . . . . . . : Answer
    A (Host) Record . . . : 192.168.0.2

Open in new window

0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40215600
more information: when I take the Domain Controller out of the mix, it works. /var/log/messages:
Jul 23 17:50:09 mail named[22276]: client 192.168.0.2#5945: updating zone '0.168.192.in-addr.arpa/IN': deleting rrset at '100.0.168.192.in-addr.arpa' PTR
Jul 23 17:50:09 mail dhcpd: DHCPRELEASE of 192.168.0.100 from 00:25:b3:bf:f5:42 (hplaptop) via eth1 (found)
Jul 23 17:50:09 mail dhcpd: DHCPDISCOVER from 00:25:b3:bf:f5:42 via eth1
Jul 23 17:50:09 mail dhcpd: Removed reverse map on 100.0.168.192.in-addr.arpa.
Jul 23 17:50:10 mail dhcpd: DHCPOFFER on 192.168.0.100 to 00:25:b3:bf:f5:42 (hplaptop) via eth1
Jul 23 17:50:10 mail named[22276]: client 192.168.0.2#5945: updating zone '0.168.192.in-addr.arpa/IN': deleting rrset at '100.0.168.192.in-addr.arpa' PTR
Jul 23 17:50:10 mail named[22276]: client 192.168.0.2#5945: updating zone '0.168.192.in-addr.arpa/IN': adding an RR at '100.0.168.192.in-addr.arpa' PTR
Jul 23 17:50:10 mail dhcpd: DHCPREQUEST for 192.168.0.100 (192.168.0.2) from 00:25:b3:bf:f5:42 (hplaptop) via eth1
Jul 23 17:50:10 mail dhcpd: DHCPACK on 192.168.0.100 to 00:25:b3:bf:f5:42 (hplaptop) via eth1
Jul 23 17:50:11 mail dhcpd: Added reverse map from 100.0.168.192.in-addr.arpa. to hplaptop.hprs.local

Open in new window

> host hplaptop
hplaptop.hprs.local has address 192.168.0.100

Open in new window

Without DC, the zone file is in /var/named/db.hprs.local
$ORIGIN .
$TTL 14400      ; 4 hours
hprs.local              IN SOA  mail.hprs.local. sysadmin.mail.ohprs.org. (
                                3          ; serial
                                10800      ; refresh (3 hours)
                                3600       ; retry (1 hour)
                                604800     ; expire (1 week)
                                3600       ; minimum (1 hour)
                                )
                        NS      mail.hprs.local.
$ORIGIN hprs.local.
$TTL 3600       ; 1 hour
hplaptop                A       192.168.0.100
                        TXT     "316472d447417e76dd7b0d30be2378f045"
$TTL 14400      ; 4 hours
mail                    A       192.168.0.2
$TTL 3600       ; 1 hour
PHONETREE               A       192.168.0.101
                        TXT     "310110f8776a089fefa36cb750b747c853"
$TTL 14400      ; 4 hours
richo                   A       192.168.0.20

Open in new window

The above contrasted with the /etc/samba/private/dns/hprs.local.zone shown in my previous posting.

The smb.conf file use w/o DC is:
options {
        directory "/var/named";

        forwarders {            // These are the ISP provided name servers
            66.193.88.3;
            66.192.88.4;
        };

        allow-query {           // Permit querying by others in the domain
            192.168.0.0/24;
            127.0.0.1;
        };
};

zone "localhost" {
        type master;
        file "db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "db.127";
};

zone "hprs.local" in {
    type master;
    allow-update { 192.168.0.2; 127.0.0.1; };         // local DHCP server
    file "db.hprs.local";
};

zone "0.168.192.in-addr.arpa" in {
    type master;
    allow-update { 192.168.0.2; 127.0.0.1; };           // local DHCP server
    file "db.192.168.0";
};

Open in new window

and with DC is:
/etc/named.conf:
options {
        forwarders {            // These are the ISP provided name servers
            66.193.88.3;
            66.192.88.4;
        };

        allow-query {           // Permit querying by others in the domain
            192.168.0.0/24;
            127.0.0.1;
        };
};

zone "localhost" {
        type master;
        file "/var/named/db.local";
};

zone "127.in-addr.arpa" {
        type master;
        file "/var/named/db.127";
};

include "/etc/samba/private/named.conf";

----
/etc/samba/private/named.conf:

zone "hprs.local." IN {
        type master;
        allow-update { 192.168.0.2; 127.0.0.1; };           // local DHCP server
        file "/etc/samba/private/dns/hprs.local.zone";

        /* we need to use check-names ignore so _msdcs A records can be created */
        check-names ignore;
};

# The reverse zone configuration is optional.

zone "0.168.192.in-addr.arpa" in {
    type master;
    allow-update { 192.168.0.2; 127.0.0.1; };           // local DHCP server
    file "/etc/samba/private/dns/db.192.168.0";
};

Open in new window

So, is Samba messing things up? If so, how so?
0
 
LVL 1

Author Comment

by:jmarkfoley
ID: 40217795
Here's what I'm going to do. Since I have narrowed it down to Samba4's messing with DNS which causes the problem, I'm going to close this message and post a more succinct question specifically for samba4/dns. That will get rid of the preliminary clutter in this posting.
0
 
LVL 1

Author Closing Comment

by:jmarkfoley
ID: 40217800
reposting
0

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Reload DC in a single server environment 5 59
active directory 11 25
Codiing Non-Existent Links 4 27
Linux as a middle box 7 28
Introduction You may have a need to setup a group of users to allow local administrative access on workstations.  In a domain environment this can easily be achieved with Restricted Groups and Group Policies. This article will demonstrate how to…
I wrote this article to explain some important DNS concepts that should be known to avoid some typical configuration errors I often see in forums. I assume that what is described here is the typical behavior of Microsoft DNS client. I don't know …
This tutorial will walk an individual through the process of configuring their Windows Server 2012 domain controller to synchronize its time with a trusted, external resource. Use Google, Bing, or other preferred search engine to locate trusted NTP …
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now