I am trying to find out why multiple search domains do not work with Debian 8.8.0. If you add the search domains in /etc/resolv.conf it will only work with one of them & in this case domain1.local works but domain2.local will not.
If you manually append the FQDN it works fine. This is for any and all CLI based tools: nslookup, ping, iperf, nmap, curl, wget ect. I have seen this before where Debian does not work with .local domains - and you have to remove avahi which I have already done to get the first .local domain working: domain1.local.
I have had multiple .local & other domain's working but with this version of Debian
8.8.x it is not working.
user@host:~$ uname -a Linux host 3.16.0-4-amd64 #1 SMP Debian 3.16.43-2+deb8u2 (2017-06-26) x86_64 GNU/Linux user@host:~$ cat /etc/resolv.conf nameserver 126.96.36.199 ### Standard Search domains: search domain1.local domain2.local domain3.local domain4.local
search domain - domain1 automatically appends the domain1.local and works for nslookup, ping ect.
user@host:~$ ping host1 PING host1.domain1.local (188.8.131.52) 56(84) bytes of data. 64 bytes from host1.domain1.local (184.108.40.206): icmp_seq=1 ttl=118 time=63.6 ms user@host:~$ nslookup host1 Server: 220.127.116.11 Address: 18.104.22.168#53 Name: host1.domain1.local Address: 22.214.171.124
domain2 will not automatically be appended to the host (hosty) in this example. It will not find hosty with an
nslookup from the dns server in
/etc/resolv.fon (although it does exist). However - if you append the
FQDN and run an
wget or any other cli based ip communication it works.
user@host:~$ nslookup hosty ;; Got SERVFAIL reply from 126.96.36.199, trying next server ;; Got SERVFAIL reply from 188.8.131.52, trying next server Server: 184.108.40.206 Address: 220.127.116.11#53 ** server can't find hosty: SERVFAIL user@host:~$ ping hosty ping: unknown host hosty
If we append domain2.local on the end of the host it can ping, nslookup, or other.
ping,nslookup & curl working with fqdn
user@host:~$ ping hosty.domain2.local PING hosty.domain2.local (18.104.22.168) 56(84) bytes of data. 64 bytes from hosty.domain2.local (22.214.171.124): icmp_seq=1 ttl=119 time=63.6 ms nslookup with fqdn: user@host:~$ nslookup hosty.domain2.local Server: 126.96.36.199 Address: 188.8.131.52#53 Name: hosty.domain2.local Address: 184.108.40.206 user@host:~$ curl hosty.domain2.local curl: (7) Failed to connect to hosty.domain2.local port 80: Connection refused
It is worth mentioning that I have this identical configuration on a Ubuntu 16.04 workstation working with around 7 search domains.
The new Debian 8.8.x servers have the issue with working with more than 1 search domain. I must be missing some simple additional configuration that is required for Debian that is slightly different than Ubuntu.