Score:0

Prevent network manager to edit /etc/resolv.conf

in flag

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

waltinator avatar
it flag
`127.0.0.53` is used to invoke `systemd-dnsmasq`. Read `man dnsmasq systemd-dnsmasq`. Manage `/etc/resolv.conf` via `dnsmasq`, not by hand.
in flag
Ok i'll try. Thanks for your help !
guiverc avatar
cn flag
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.
in flag
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.
in flag
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
Score:0
tn flag

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

Add the following to the [main] section:

dns=none
rc-manager=unmanaged

Restart NetworkManager.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.