0

I setup a DNS server today on Ubuntu, following this tutorial. My intent was to setup my network for dns-name resolving on the private LAN within a single zone (nothing fancy I just want name resolution).

I've tested the setup on the DNS server machine itself, and I can ping all the machines listed in the configuration file. I've also configured the Windows Machines on my network, and for some reason they are incapable of pinging by names as was possible on the DNS Server itself.

I've tried running nslookup on the Windows DNS clients and I receive and error mentioning the address of the DNS server.

DNS forwarding works fine, I'm not having any trouble accessing the internet, the problem only lies within accessing names within the private LAN.

Here are my configuration files:


options {
    directory "/var/cache/bind";

    // If there is a firewall between you and nameservers you want
    // to talk to, you may need to fix the firewall to allow multiple
    // ports to talk.  See http://www.kb.cert.org/vuls/id/800113

    // If your ISP provided one or more IP addresses for stable 
    // nameservers, you probably want to use them as forwarders.  
    // Uncomment the following block, and insert the addresses replacing 
    // the all-0's placeholder.

    // forwarders {
    //  0.0.0.0;
    // };

       forwarders {
                8.8.8.8;
                8.8.8.4;
                74.242.0.12;
                //68.87.76.178;
       };

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };
};

/etc/bind/named.conf.options


zone "leerdomain.local" {
   type master;
   file "/etc/bind/zones/leerdomain.local.db";
   notify no;
};

zone "2.168.192.in-addr.arpa" {
    type master;
    file "/etc/bind/zones/rev.2.168.192.in-addr.arpa";
    notify no;
};

/etc/bind/named.conf.local


Lookup:

$TTL 3D
@ IN SOA ns.leerdomain.local. admin.leerdomain.local. (
  2010011001
  28800
  3600
  604800
  38400
);
leerdomain.local.  IN      NS          ns.leerdomain.local.
ns             IN      A           192.168.2.9
asus           IN      A           192.168.2.254
www            IN      CNAME       asus
vaio           IN      A           192.168.2.253
iptouch        IN      A           192.168.2.252
toshiba        IN      A           192.168.2.251
gw             IN      A           192.168.2.1
                       TXT         "Network Gateway"

/etc/bind/zones/leerdomain.local.db
(Validates fine with named-checkzone when validating zone leerdomain.local)


Reverse Lookup:

$TTL 3D
@       IN      SOA     ns.leerdomain.local. admin.leerdomain.local. (
                201001101
                28800
                604800
                604800
                86400
)
        IN      NS     ns.leerdomain.local.
1       IN      PTR    gw.leerdomain.local.
254     IN      PTR    asus.leerdomain.local.
253     IN      PTR    vaio.leerdomain.local.
252     IN      PTR    iptouch.leerdomain.local.
251     IN      PTR    toshiba.leerdomain.local.

/etc/bind/zones/rev.2.168.192.in-addr.arpa
*(Does not validate with named-checkzone when validating zone leerdomain.local gives an error of: zone leerdomain.local/IN: NS 'ns.leerdomain.local' has no address records (A or AAAA) zone leerdomain.local/IN: not loaded due to errors. *


Despite not validating bind9 starts without errors in /var/log/syslog

I've also configured a few of the windows machines on my network to have the static ip as specified in the lookup and reverse lookup config files.

i.e. IP Address: 192.168.2.254 Subnet mask: 255.255.255.0 Default gateway: 192.168.2.1 Predefined DNS server: 192.168.2.9

Using nslookup yields the following results:

C:\Users\leeand00>nslookup ns
Server:  UnKnown
Address:  192.168.2.9

*** UnKnown can't find ns: Non-existent domain

C:\Users\leeand00>nslookup gw
Server:  UnKnown
Address:  192.168.2.9

Name:    gw.

Additionally trying to ping by name also fails on machines that are not the DNS Server.

Is there something wrong with my configuration of either the nameserver or the Windows Boxes that is keeping me from accessing other machines using names?

Update

DNS server addresses, in order of use: 192.168.2.9 Append Primary and connection specific DNS suffixes DNS suffix for this connection: leerdomain.local Checked Register this connection's address in DNS

I updated the Windows machines Advanced TCP/IP settings per Phil Hollenback's suggestion (see above) and I now seem to have naming on the network.

1
  • 1
    Using .local isn't a good idea if you have bonjure/avahi running.
    – Zoredache
    Jan 11, 2011 at 8:25

1 Answer 1

4

I'm wondering if the issue is how suffix appending is working on the windows machines. To test this, try running nslookup on a full name on one of the windows machines, i.e. nslookup ns.leerdomain.local. If that works it means your windows machines are not appending the leerdomain.local suffix to your queries. You can check that in tcp/ip properties->advanced on one of the windows machines.

Look at /etc/resolv.conf on the ubuntu box, the search directive there will tell you how that machine is appending domains. Look at the output of ipconfig /all on one of the windows machines, in particular check the output of primary dns suffix. ipconfig /displaydns may also give you some useful info about how the machine is configured to use DNS.

1
  • That would be my guess too. Try the fqdn (fully qualified domain name). Jan 11, 2011 at 8:22

You must log in to answer this question.

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