Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Custom DNS server is not working

I’ve got Ubuntu 21.10 installed on a new Framework laptop. I would like it to use my local, custom DNS Server that I set up on a Synology NAS. So, I put that IP address in the correct (I hope) spot in the Ubuntu settings:

Custom DNS Added

However, it appears that this custom DNS server is not being used at all. I run an nslookup command on a local service and it appears to be using some other DNS server, thus it cannot find my local service:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Custom DNS Not Being Used

I have heard from some sources that I should edit the /etc/resolv.conf file directly, but other sources say that it’s bad practice to do so and that I should use Ubuntu’s settings.

So what am I doing wrong and what should I do to make Ubuntu respect my choice of DNS server(s)?

Edit 12/17/2021: Per the comments, here is the result of systemd-resolve --status initially (with the "Automatic" toggle turned on):

Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign

Link 2 (wlp170s0)
    Current Scopes: DNS
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.50.1
       DNS Servers: 192.168.50.1 192.168.50.10

And then here is the result after turning the "Automatic" toggle off:

Global
       Protocols: -LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign

Link 2 (wlp170s0)
    Current Scopes: DNS
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.50.10
       DNS Servers: 192.168.50.10

So, my router is on 192.168.50.1, but I don’t see any way that it can use 192.168.50.10 for its primary DNS server.

>Solution :

In your system settings screenshot, you currently have "Automatic" enabled next to the field where you enter your custom DNS IP address.

You should disable "Automatic" for DNS. Once you do that, DNS requests should be queried from the IP address you specify in the field.

Keep in mind that individual applications might not use the DNS server that you specify in your system settings. Examples include Tor, VPN clients, and potentially even your web browser. Notably, there has been a trend for apps to move to using DoH since it is more secure and more private than typical DNS lookups which are sent in plaintext.

Getting your DNS server to work for these applications will generally need to be configured for each application in their settings. For example, Firefox has been pushing DoH lately, but you can opt-out.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading