Hello all.
*)
In my local network I have router with dhcp and dns server.
On this local network I also have machine called ‘myfedora’.
*)
On the same local network I have PC which uses network manager.
On this PC:
I use dns server that comes from dhcp server my dhcp client is connected to.
> resolvectl status
Global
Protocols: LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
Current DNS Server: 192.168.8.1
DNS Servers: 192.168.8.1 2606:4700:4700::1111 2606:4700:4700::1001
DNS Domain: lan
Link 2 (enp1s0)
Current Scopes: none
Protocols: -DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Link 3 (wlp2s0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute LLMNR=resolve -mDNS +DNSOverTLS DNSSEC=no/unsupported
DNS Servers: 192.168.8.1
DNS Domain: lan
Link 4 (vpn0)
Current Scopes: none
Protocols: -DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
And this configuration works - it is my PC sees myfedora:
> resolvectl query myfedora
myfedora: 192.168.8.187 -- link: wlp2s0
(myfedora.lan)
-- Information acquired via protocol DNS in 16.3ms.
-- Data is authenticated: no; Data was acquired via local or encrypted transport: no
-- Data from: network
> ping myfedora
PING myfedora.lan (192.168.8.187) 56(84) bytes of data.
64 bytes from 192.168.8.187: icmp_seq=1 ttl=64 time=6.30 ms
But when I configure it like that:
> resolvectl status
Global
Protocols: LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
Current DNS Server: 1.1.1.1
DNS Servers: 1.1.1.1 1.0.0.1 192.168.8.1 2606:4700:4700::1111 2606:4700:4700::1001
DNS Domain: lan
Link 2 (enp1s0)
Current Scopes: none
Protocols: -DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Link 3 (wlp2s0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute LLMNR=resolve -mDNS +DNSOverTLS DNSSEC=no/unsupported
DNS Servers: 1.1.1.1 1.0.0.1 192.168.8.1
DNS Domain: lan
Link 4 (vpn0)
Current Scopes: none
Protocols: -DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
It does not work - it is my PC does not see myfedora:
> resolvectl query myfedora
myfedora: 'myfedora' not found
> ping myfedora
ping: myfedora: Name or service not known
Similar when I activate VPN on my PC:
> resolvectl status
Global
Protocols: LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
Current DNS Server: 123.XXX.XXX.XXX
DNS Servers: 123.XXX.XXX.XXX 123.XXX.XXX.XXY 1.1.1.1 1.0.0.1 192.168.8.1 2606:4700:4700::1111 2606:4700:4700::1001
DNS Domain: lan my.vpn.connection
Link 2 (enp1s0)
Current Scopes: none
Protocols: -DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Link 3 (wlp2s0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: +DefaultRoute LLMNR=resolve -mDNS +DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 1.1.1.1
DNS Servers: 1.1.1.1 1.0.0.1 192.168.8.1
DNS Domain: lan
Link 4 (vpn0)
Current Scopes: DNS LLMNR/IPv4 LLMNR/IPv6
Protocols: -DefaultRoute LLMNR=resolve -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 123.XXX.XXX.XXX
DNS Servers: 123.XXX.XXX.XXX 123.XXX.XXX.XXY
DNS Domain: my.vpn.connection
============
So it seams that when fedora is asking for host then it only ask current dns server - it seams first that is online - and when this dns server responds but with “host not found” answer then fedora does not ask another dns server for this host.
Can it be somehow configured so I can use for example VPN and still be able to resolve my local net hosts names ?

