I have a server with active directory and dns on windows server 2012 with the following subdomain:
ac: alm.local <--- 10.0.0.3
dns hosts:
javi.a.alm.local <---- 10.0.0.20
when I solve in windows:
nslookup javi.a
server: localhost
address: 127.0.0.1
name: javi.a.alm.local
address: 10.0.0.20
but when i result in debian:
nslookup javi.a
Server: 10.0.0.3
Address: 10.0.0.3 # 53
** server can't find javi.a: NXDOMAIN
why does it not solve ??
resolv.conf:
nameserver 10.0.0.3
search alm.local
By default, the Linux resolver will not apply the
search
domain to a queried name that already contains a dot. Sojavi.a
will be treated as a FQDN and will not have the domainalm.local
appended to it.You can change this behavior using the
ndots
option
. This says the minimum number of dots that can be in a name to be treated as a FQDN. It defaults to1
.You should also consider the warnings in the man page
resolv.conf(5)
before doing so.And the documentation for
options ndots
:(Note that this implies that the name will be tried with search domains after being tried as a FQDN, but in practice this does not actually happen. It is not tried with the search domains at all. Which is why you have posted here today.)
So in resolv.conf you can add:
And a name with one dot will now have the search domain appended, but names with two or more dots will not. As the man page says, you can set this as high as 15 if necessary.