From 8cbc96329d88c9eceaeafc8158487ab27303ab43 Mon Sep 17 00:00:00 2001 From: Xiao Pan Date: Fri, 17 Mar 2023 02:03:24 -0700 Subject: Final fix DNS resolv issues when using mullvad vpn default DNS Fix can not resolve www.a.com, while a.com is `search a.com` in /run/NetworkManager/resolv.conf and /run/systemd/resolve/resolv.conf, I think `search a.com` is from router. Fix after suspend can not connect to internet due to mullvad and networkmanager fighting over /etc/resolv.conf and cause resolv.conf be empty. (not sure the cause is correct). This can also be fixed by symlink using systemd-resolved see below. I do not know why this fix work. I find this fix through trail and error. These changes in configs uses mullvad-vpn, openresolv, dnsmasq, avahi-daemon, and networkmanager. The features are dns cache (dnsmasq) and mdns (avahi-daemon). The best way to use systemd-resolved with dns cache is `sudo ln -rsf /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf`. But I can not find a way to fix the issue of not resolve www.a.com see above. I **guess** the most likely way for systemd-resolved to work is somehow config systemd-resolved to not get DNS from router. --- etc/resolvconf.conf | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'etc/resolvconf.conf') diff --git a/etc/resolvconf.conf b/etc/resolvconf.conf index 4f5f2e6f..66534b26 100644 --- a/etc/resolvconf.conf +++ b/etc/resolvconf.conf @@ -1,7 +1,10 @@ # Configuration for resolvconf(8) # See resolvconf.conf(5) for details -resolv_conf=/etc/resolv.conf -# If you run a local name server, you should uncomment the below line and -# configure your subscribers configuration files below. -#name_servers=127.0.0.1 +# https://wiki.archlinux.org/title/Dnsmasq#openresolv +# Use the local name server +name_servers="::1 127.0.0.1" +resolv_conf_options="trust-ad" +# Write out dnsmasq extended configuration and resolv files +dnsmasq_conf=/etc/dnsmasq-conf.conf +dnsmasq_resolv=/etc/dnsmasq-resolv.conf -- cgit v1.2.3-70-g09d2