You are not logged in.
Whenever I make a network change of any kind, My DNS keeps resetting to the following:
[root@DEVICE ~]# cat /etc/resolv.conf
# Generated by NetworkManager
search lan
nameserver 192.168.8.1I can mitigate this by using
[root@DEVICE ~]# echo "nameserver 1.1.1.1" >> /etc/resolv.conf This occured when I was digging around my NetworkManager Config trying to figure out why I was having a DNS leak with my VPN connection, but I'm not entirely sure what I did.
I ran resolvectl after adding the cloudflare nameserver entry
[root@DEVICE ~]# resolvectl
Global
Protocols: +LLMNR +mDNS +DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: foreign
Current DNS Server: 1.1.1.1
DNS Servers: 192.168.8.1 1.1.1.1
Fallback DNS Servers: 9.9.9.9#dns.quad9.net 2620:fe::9#dns.quad9.net 1.1.1.1#cloudflare-dns.com 2606:4700:4700::1111#cloudflare-dns.com
DNS Domain: lan
Link 2 (enp198s0f0u2u3)
Current Scopes: DNS LLMNR/IPv4 mDNS/IPv4
Protocols: +DefaultRoute +LLMNR +mDNS +DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.8.1
DNS Servers: 192.168.8.1
DNS Domain: lan
Default Route: yes
Link 3 (wlan0)
Current Scopes: DNS LLMNR/IPv4 mDNS/IPv4
Protocols: +DefaultRoute +LLMNR +mDNS +DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 192.168.8.1
DNS Servers: 192.168.8.1
DNS Domain: lan
Default Route: yesI think I messed up some default entry somewhere, but for the life of me, I can't figure out where it is.
Offline
NetworkManager is unaware that systemd-resolved should manage resolv.conf and rewrites it.
Create the correct symlink (resolv.conf) for systemd-resolved's "stub" mode.
See https://wiki.archlinux.org/title/Networ … forwarding
Offline
`/etc/resolv.conf` is being generated by NetworkManager, so manually adding `1.1.1.1` there will usually be overwritten the next time the connection changes. The `192.168.8.1` entry is most likely being supplied by your router through DHCP. I’d check the active NetworkManager connection with `nmcli connection show` and then inspect its DNS settings. You can set the DNS servers on the connection itself instead of editing `resolv.conf` directly, for example with `nmcli connection modify "<connection>" ipv4.dns "1.1.1.1 9.9.9.9"` and then reconnect. Also, since both `enp...` and `wlan0` are showing 192.168.8.1, make sure both interfaces aren’t active at the same time. That can make DNS behaviour confusing, especially when you’re testing a VPN.
Last edited by herman45 (2026-09-25 09:09:46)
Offline