Score:0

Local DNS domain lookup is extremely slow

br flag

I have a DNS server I use to route traffic to local services. For example, it points router.home.lan to my router.

However, when I try to visit this address in my browser on my Ubuntu machine, it takes an extremely long time to load. If I visit the page on my Macbook or use the IP address on my Ubuntu machine then the page to load instantly.

I believe it has something to do with the DNS resolution on my Ubuntu machine. Here is the output from host:

time host -v router.home.lan                                            
Trying "router.home.lan"
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59318
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;router.home.lan.       IN  A

;; ANSWER SECTION:
router.home.lan.    2   IN  A   192.168.1.1

Received 49 bytes from 127.0.0.53#53 in 12 ms
Trying "router.home.lan"
;; connection timed out; no servers could be reached

Trying "router.home.lan"
;; connection timed out; no servers could be reached

host -v router.home.lan  0.01s user 0.01s system 0% cpu 20.021 total

The first result comes back instantly, then the next two time out after 10 seconds each. I get the same behavior with ping.

This only happens with my local services on the home.lan domain.

Changing nameserver in /etc/resolv.conf to the IP of my local DNS server fixes the problem, however that's not sustainable as it frequently gets overwritten and causes issues outside of my network.

in flag
Would setting the IP address of the DNS server in `/etc/hosts` not give you the consistency you’re looking for?
br flag
@matigo - the file says "This file is managed by man:systemd-resolved(8). Do not edit." and thus the changes I make are often overwritten. I've read that I can set the name server in the `/etc/resolvconf/resolv.conf.d/base` file but that has no effect. Also, this DNS server only applies within my home which is why I'd rather not hard code it for the whole system.
Score:0
ru flag

In terminal, type:

nm-connection-editor

And edit your "Wired Connection".

enter image description here

br flag
I've tried setting both the "DNS Servers" as well as "additional search domains" to the relevant values but it doesn't seem to have an effect. However I did this for my wireless network instead of "Wired Connection" as my laptop doesn't have a wired connection.
heynnema avatar
ru flag
@kfoley Show me `cat /etc/resolv.conf`, then reboot, then show me `cat /etc/resolv.conf` again. Also show me `ls -al /etc/resolv.conf`.
heynnema avatar
ru flag
@kfoley Status please...
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.