0

I set up bind on 192.168.0.1 machine. Also, I have subscribed to a domain service, so I use mydomain.net (sanitized name) for the FQDN in my home network.

When I do an

$ nslookup "name of 192.168.0.1"

from 192.168.0.xxx (connected to 192.168.0.0 home network through wifi with dhcp) I get an NXDOMAIN error.

* server can't find name: NXDOMAIN

However, if I do an

$ nslookup "FQDN of 192.168.0.1"

the result is without error, see below (sanitized):

$ nslookup name.mydomain.net
Server: 127.0.1.1
Address: 127.0.1.1#53

Name: name.mydomain.net
Address: 192.168.0.1

If I do nslookup on the 192.168.0.1 machine for "name of 192.168.0.xxx" I get the NXDOMAIN error even if I use FQDN for 192.168.0.xxx.

Is this normal behavior, is my dns set up properly on 192.168.0.1?

Thanks - Janos

Janos
  • 133
  • 3
  • it sounds like you don't have a search domain set up. DNS Clients on a lan will often apply "search domains", so that short name searches like `box1` will be expanded with a default domain for lookup (eg `box1.example.com`, if the default search domain is `example.com`). Since it looks like you are using linux, what are the contents of your /etc/resolv.conf? see this question for more details on search domains in resolv,conf: http://superuser.com/questions/570082/in-etc-resolv-conf-what-exactly-does-the-search-configuration-option-do – Frank Thomas Apr 21 '16 at 12:56
  • It looks like you didn't specified `A` records for your local network hosts including your server in the main zone file. Show content of your `db.mydomain.net` or `mydomain.net` zone file in `/etc/bind/` directory. – Oleg Bolden Apr 21 '16 at 18:53
  • @Thomas - my resolv.conf had nameserver 192.168.0.1 and search mydomain.net - now I change it to search name.mydomain.net – Janos Apr 23 '16 at 14:41
  • @Bolden - I did have A record as 192.168.0.1, but now I changed it to my public IP in the zone files of both name.mydomain.net and mydomain.net – Janos Apr 23 '16 at 14:49
  • With piblic IP in the zone file A record nslookup box1.mydomain.net returns box1.mydomain.net with the public IP and no NXDOMAIN error. This works if the command is issued from box2 on the 192.168.0.0 network or if box2 is connected to Internet via a totally different ISP, i.e. box2 is not on my home network with wifi. I'll mark this question answered - thank you all. – Janos Apr 23 '16 at 15:07

0 Answers0