0

I'm running an Ubuntu 18.04 Desktop workstation on a network that hosts a Windows domain. The Windows domain servers provide DNS resolution for local servers, but don't always provide accurate DNS resolution for remote servers. This means that, if I make a non-domain DNS server as my primary (such as Google's 8.8.8.8), I can resolve web servers but not local servers. If I put the domain controller as my primary DNS server, I can resolve local servers, but not some web servers (notably AWS Cloudfront endpoints).

Example with Google DNS as primary and domain controller as secondary:

nslookup localserver
Server:     8.8.8.8
Address:    8.8.8.8#53

** server can't find localserver: NXDOMAIN

Is there a way to get DNS resolution to check with the secondary DNS server in the event that the primary DNS server is unable to resolve a DNS name?

  • you should setup a forwarder on your windows dns server – cmak.fr Jun 5 '18 at 19:02
0

You can see your current configured DNS server list in

/run/systemd/resolve/resolv.conf

If it does not contain all the DNS server you need, try adding more, each separated by comma in the network settings under IPV4 tab, IPV4 DNS setup

If that doesn't work, you can setup fallback DNS directly in /etc/systemd/resolved.conf

Here's a sample:

#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.
#
# Entries in this file show the compile time defaults.
# You can change settings by editing this file.
# Defaults can be restored by simply deleting this file.
#
# See resolved.conf(5) for details

[Resolve]
#DNS=
#FallbackDNS=
#Domains=
#LLMNR=no
#MulticastDNS=no
#DNSSEC=no
#Cache=yes
#DNSStubListener=yes
  • Thank-you for your reply. I edited the DNS servers in network settings, and that changed what's in /run/systemd/resolve/resolv.conf, but the problem persists. Un-commenting and filling in the lines in /etc/systemd/resolved.conf don't seem to have had any effect. Is there a way to verify that the latter file is being read? – DaneM Jun 5 '18 at 19:45
  • Try looking at /run/systemd/resolve/resolv.conf I just learned that you now can use this command: systemd-resolve --status – Bernard Wei Jun 5 '18 at 21:24
0

If I understand you right, than you are trying something like this:

https://unix.stackexchange.com/questions/109115/combining-different-dns-servers

And than the given solution is also for you

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.