1

Network manager is always editing /etc/resolv.conf, resulting in a network outage. I already tried this https://askubuntu.com/a/623956/856647 with no luck.

I'm on Lubuntu 20.04

# Generated by NetworkManager
search home
nameserver 127.0.0.53  <------ I always have to change for 127.0.0.1

I don't know why it started to do this, I can't remember messing with network manager recently.

any idea ? thanks for your help

ramsey_lewis
  • 121
  • 2
  • `127.0.0.53` is used to invoke `systemd-dnsmasq`. Read `man dnsmasq systemd-dnsmasq`. Manage `/etc/resolv.conf` via `dnsmasq`, not by hand. – waltinator Sep 13 '21 at 19:36
  • Ok i'll try. Thanks for your help ! – ramsey_lewis Sep 13 '21 at 21:04
  • The first line of the file you're asking about says "*This is /run/systemd/resolve/stub-resolv.conf managed by man:systemd-resolved(8).*", the second line says "*Do no edit.*" as the file is generated at boot, and re-generated at various time when certain functions are performed; thus edits aren't expected to survive certain service restarts (which can be triggered by ...) Lubuntu recommends edits thru `nm-tray` (see https://manual.lubuntu.me/lts/3/3.1/3.1.5/nm-tray.html) but sections in the manual exist for VPNs and special circumstances. – guiverc Sep 13 '21 at 22:19
  • I ended with a liveCd of xubuntu, and i copied `/run/systemd/resolve/` folder then added the symlink betweend `/run/systemd/resolve/resolv.conf` and `/etc/resolv.conf`. Internet is back, but when i restart the computer, I have no internet because `/run/systemd/resolve/` is erased by something and I don't know why. I never touched thos file, i wonder what is messing with that. – ramsey_lewis Sep 16 '21 at 14:44
  • AH! I did this and It now works without issue https://askubuntu.com/a/134137/856647 I used the 2nd cmd with the purge option – ramsey_lewis Sep 16 '21 at 15:06

1 Answers1

0

Open /etc/NetworkManager/NetworkManager.conf in an editor as root.

Add the following to the [main] section:

dns=none
rc-manager=unmanaged

Restart NetworkManager.