[Samba] Samba DNS fails when queried with nslookup commands
James Atwell
james.atwell365 at gmail.com
Thu Aug 13 15:24:10 UTC 2020
On 8/13/2020 11:06 AM, L.P.H. van Belle via samba wrote:
>
>
>> -----Oorspronkelijk bericht-----
>> Van: James Atwell [mailto:james.atwell365 at gmail.com]
>> Verzonden: donderdag 13 augustus 2020 16:48
>> Aan: samba at lists.samba.org
>> CC: L.P.H. van Belle
>> Onderwerp: Re: [Samba] Samba DNS fails when queried with
>> nslookup commands
>>
>>
>> On 8/13/2020 9:57 AM, L.P.H. van Belle via samba wrote:
>>> Hai James,
>>>
>>> Thanks, thats exactly what we needed.
>>> I'll comment below.
>>>
>>>
>>> ** SNIP **
>>
>> Louis,
>>
>> Couldn't figure out how to remove 127.0.0.53 from
>> resolv.conf so
>> I removed systemd-resolve per Rowlands post. I then removed the
>> forwarders from my smb.conf and rebooted. Nslookup partially
>> worked as
>> it used the other DC in the network to resolve and complained soldc4
>> couldn't do recursive queries. I added back in the
>> forwarders and dns
>> resolution appeared to work correctly except on soldc4.
>> Except for one minor issue still remains. See output below.
> This is sufficient.
>
> systemctl disable systemd-resolved
> systemctl mask systemd-resolved
>
> And it wont start again.
>
>
>> @soldc4:~# nslookup soldc4
>> Server: 172.16.23.30
>> Address: 172.16.23.30#53
> nslookup $(hostname -f)
> Should work.
>
>
>> Non-authoritative answer:
>> *** Can't find soldc4: No answer
> This is a correct reply.
>
>> root at soldc4:~# nslookup soldc4.domain.local
>> Server: 172.16.23.30
>> Address: 172.16.23.30#53
>>
>> Name: soldc4.domain.local
>> Address: 172.16.23.30
> So its in fqdn correct.
>
> If you want nslookup soldc4 to work, then you need the search line in resolv.conf
>
>
>>
>> The issue now is since I disabled systemd-resolve it also removed my
>> search domain from resolv.conf.
>>
>> @soldc4:~$ cat /etc/resolv.conf
>> # Dynamic resolv.conf(5) file for glibc resolver(3) generated by
>> resolvconf(8)
>> # DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE
>> OVERWRITTEN
>> # 127.0.0.53 is the systemd-resolved stub resolver.
>> # run "systemd-resolve --status" to see details about the actual
>> nameservers.
>> nameserver 172.16.23.30
>> nameserver 172.16.23.28
> rm /etc/resolv.conf
> editor /etc/resolv.conf
> search domain.local
> nameserver 172.16.23.30
> nameserver 172.16.23.28
>
> Also one tip here, if you setup resolv.conf manualy
> Add :
> search domain.local
> nameserver 172.16.23.28
> nameserver 172.16.23.30
>
> Reboot
> Check the dns.
> If ok, then change :
> search domain.local
> nameserver 172.16.23.30
> nameserver 172.16.23.28
> # Note, ad join DC1 is first, after join, you can switch the nameserver lines.
>
>
>>
>> Where do I need to add my search domain as I already added to
>> my netplan
>> config and 50-cloud.init.yaml is the only file to config.
>>
>> ls -la /etc/netplan/
>> total 12
>> drwxr-xr-x 2 root root 4096 Aug 13 10:03 .
>> drwxr-xr-x 113 root root 4096 Aug 13 10:04 ..
>> -rw-r--r-- 1 root root 584 May 28 19:36 50-cloud-init.yaml
>>
>> Thanks.
> If you config through netplan is/was correct, then and you use systemd-resolved
> It should always be correct.
>
> But thats a choice, set resolv.conf manualy or set it in you network config.
>
> Currently, i preffer through systemd-networked its config. ( on debian )
> Ubuntu its default is netplan.
>
>
> So far,
>
> Greetz,
>
> Louis
>
Everything is working as it should now. One thing I will add that I did
do differently is I remember from previous Ubuntu OS's I could modify
the following file to permanently change resolv.conf
/etc/resolvconf/resolv.conf.d/head
I added the search domain there and resolv.conf shows my search domain.
From my perspective nslookup is now resolving correctly and I believe
the issue is resolved. Thanks again for yours and Rowlands help.
-James
More information about the samba
mailing list