Local DNS!

Tags: #<Tag:0x00007fc4001df5f8>

Hi

Why is it that I can find post after post with people trying to get local network name resolution working and failing? There are some very bright people here, and they can’t find a solution to it.

I have an integration that needs to connect to a server name, no matter what I do I cannot get it to connect reliably, it works for a random amount of time then stops. Removing and re-adding is very hit and miss. Lookups from the host work fine (it is a ready-rolled image hosted in Hyper-V), or any other network device.

It seems that there are some DNS IP addresses hard-coded somewhere - and cannot be removed - which just causes confusion. We should have proper control over this.

PLEASE for the sake of everyone’s sanity can we have something done about this?! DNS options/update does not work reliably.

Cheers
Ben





3 Likes

Oh please yes! Using tcpdump I was able to determine that HA is bypassing my selected DNS server (AdGuard) and instead resolving via 1.1.1.1! This is despite the ha dns into command showing nothing of this server.

I have similar issues. Local DNS resolution only works for a certain time after restarting the local DNS server. I should ask my separate Adguard RPI instance under .222 which in turn is configured to resolve .fritz.box with the local FritzBox (.1).

Config:
image

I’d be happy over a fix. I worked better “in the past”.

The “only works for a certain time” had me thinking I was going mad and that I had network issues (the Pi I was trying to resolve is in another subnet in a DMZ…), it would work then break itself - not helpful behaviour!

I’m in the same boat… on HassOS would you believe it.
Please chime in on the issue that I’ve created :

Despite that issue being closed I’m still having intermittent DNS issues.

dns

Where did those “locals” come from?

My router (10.1.1.1) is set up to use 1.1.1.1 and 9.9.9.9.

you can add dns servers in HA.

ha dns options --servers dns://1.1.1.1 --servers dns://9.9.9.9

I found I started having problems with dns when I enabled secure dns in my router but this seemed to fix it

Yeah I already added the 1.1.1.1 server but it’s redundant. If my router is not working HA is not going to be able to reach it. So I only really need 10.1.1.1.

So how do I remove a server, or the “locals”?

Yeah but you’re effectively using the dns in your router which in my case was the problem.

Edgerouter X has a good rep. I’d rather use that than rely on anything in home assistant.

1 Like

Well so does my FritzBox lol…
Presumably it’s only HA with this issue?

:man_shrugging:

The HA Supervisor DNS log is not showing any errors.

But I’m getting intermittent connection to ABB, ARPANSA (UV index) , and local connections like the InFluxDB addon.

Hmm… local is a worry.
I had an issue this week with sources.list on my Proxmox box timing out on FTP.au.debian.org that I had never had an issue with before yet it was actually up so I ended up just changing the mirror in sources.list and it updated normally. Honestly these stupid inexplicable errors just wear me out.

My issues were solved with the last coredns update.
For completeness :

➜  /config ha dns info
host: 172.30.32.3
locals:
- dns://192.168.11.2
servers:
- dns://192.168.11.2
- dns://192.168.11.1
update_available: false
version: 2020.11.0
version_latest: 2020.11.0

note : The 2nd server line (192.168.11.1) is redundant, 192.168.11.1 has 192.168.11.2 as its dns server.

How do I remove Google DNS (8.8.8.8) from “locals”?

image

i’m not certain, but it might be configured through the host os (HassOS) in the /etc/resolv.conf file ?

# cat /etc/resolv.conf
# Generated by NetworkManager
search local
nameserver 192.168.11.2

What does yours look like ?

Ah bugger. I won’t have access to the host for a while. I didn’t pre-share keys before I went away.

You can change it in the Supervisor UI page.

dns

1 Like

Don’t know. I have stuff that comes and goes from there.

Weirdly I seem to be seeing the same with the latest docker image. I’ve verified /etc/resolv.conf has the correct servers by exec’ing bash in the container and can even get the nslookup command to resolve succesfully but HA itself will not. What am I missing here? I’d really prefer to not have to load up a VM just for HA :frowning: