With your help and ideas, I think I found the root of the problem: I have an WLAN access point running OpenWrt 23.05 that my laptop is connected to (sorry I didn’t tell this earlier, I didn’t know it might me important). I started to learn wireshark and I found a ICMPv6 package from the access point I’m connected to and that’s exactly where the fe80:: DNS server address came from.
So these steps fixed the problem for me:
- I changed the OpenWrt router’s settings as follows:
- I configured OpenWRT to use Unique Local Addresses (ULA) instead of link-local addresses for IPv6 Router Advertisements:
- Network → Interfaces → Global network settings → IPv6 ULA-Prefix: Should be already set
- Network → Interfaces → lan → “Edit” → Advanced settings → Set “IPv6 assignment length” to 64
- Forward all DNS requests to my main router which knows all devices on my lan so that the name resolution for local devices work:
- Network → DHCP and DNS → Forwards → Add my main routers IPv4 and IPv6 ULA address to the DNS Forwards list
- Disable DNS rebind attack prevention (sounds like a bad idea, but my main router will have to take care of that)
- Network → DHCP and DNS → Filter → Disable “Rebind protection”
- I configured OpenWRT to use Unique Local Addresses (ULA) instead of link-local addresses for IPv6 Router Advertisements:
- On my laptop connected to that WiFi, I changed the interface settings to the default DNS server
When I do a resolvectl now, I get the following DNS servers for my WiFi interface:
- My main routers IPv4 address
- My main routers IPv6 ULA address
- My WiFi access point’s IPv6 ULA address
I tested the name resolution for a server on my network for all three of them with
nslookup <my_server_on_my_lan.mydomain.name> <the ip adress from resolvectl>
and all three work.
Thanks for your help!