Page MenuHomePureOS Tracker

Network Manager populating /etc/resolv.conf with bogus nameservers
Closed, ResolvedPublic


My Librem 13 v2 has an issue where /etc/resolv.conf is being populated with fake nameservers (always the same ones). I can change /etc/resolv.conf to point to my actual network gateway but at some later time, network manager overwrites it and I loose all networking outside of my LAN.

I know that directly writing to /etc/resolv.conf will be overwritten by network manager, but until I find a more permanent solution, this has been my workaround.

Points to note:

  • /etc/resolv.conf is a symlink to /etc/resolvconf/run/resolv.conf
  • No VPN is running

Network manager thinks my /etc/resolv.conf should be:


I have no idea where 192.168.237* is coming from. Network manager must be drunk.

My /etc/resolv.conf should be:


Event Timeline

The issue was caused by allowing an openvpn-based vpn to start automatically on boot. The vpn config file ran /etc/openvpn/update-resolv-conf which ran /sbin/resolvconf (or exits if the resolvconf package is not installed). So in the case where the resolvconf package is not installed, there is no problem if you boot the system and stop the vpn. However, the resolvconf package was causing the default nameservers to be 192.168.237.*

/sbin/resolvconf is responsible for coming up with the default nameservers that are put into /etc/resolv.conf when the vpn is up. However, by systemctl stop openvpn (and thereby stopping all vpn processes), the /etc/resolv.conf is not corrected. In fact, if you manually correct it, Network Manager overwrites it with the bad /etc/resolv.conf again. So I believe this resolv.conf (with bogus nameservers) is being cached somewhere and Network Manager is incorrectly picking it up.

Note that configuring /etc/resolvconf.conf to keep daemons from overwriting your manual changes to resolv.conf does not do anything.

Without root causing the problem in NetworkManager/resolvconf, here are a couple of workarounds for this issue :

  • Avoid installing the resolvconf package
  • set AUTOSTART="none" in /etc/default/openvpn to ensure no vpns start on boot

Closing this since there is a workaround.

heather.ellsworth closed this task as Resolved.May 24 2018, 15:13