After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 797383 - dns=dnsmasq not taken into account
dns=dnsmasq not taken into account
Status: RESOLVED OBSOLETE
Product: NetworkManager
Classification: Platform
Component: IP and DNS config
1.10.x
Other Linux
: Normal minor
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2018-11-15 00:00 UTC by Yoan
Modified: 2020-11-12 14:27 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Yoan 2018-11-15 00:00:39 UTC
When installing NM 1.10.6, if the user has NetworkManager.conf with "dns=dnsmasq", it does not preserve dnsmasq as the local resolver.

It results in a broken DNS configuration, with /etc/resolv.conf set to 127.0.0.53 but NetworkManager set to dnsmasq.

See initial Ubuntu bug report https://bugs.launchpad.net/ubuntu/+source/network-manager/+bug/1803236
Comment 1 Thomas Haller 2018-11-15 09:15:05 UTC
Hi.

If NM configured a nameserver of 127.0.0.53 in /etc/resolv.conf, it would indicate that it uses "dns=systemd-resolved" and not "dns=dnsmasq".

Presuming that you correctly configured "dns=dnsmasq" in NetworkManager.conf, it's more likely that NetworkManager is not actually handling /etc/resolv.conf and this file was written by somebody else (netplan?).

That is controlled via "main.rc-manager" setting, see `man NetworkManager.conf`. Note, that (on many systems) the default main.rc-manager is "symlink", which means NM would not touch /etc/resolv.conf if somebody replaced the file with a symlink. The solution for that could be to just delete the symlink (so that NM writes it as file and takes over) or configure main.rc-manager=file.


You need to make up your mind how NetworkManager should handle DNS and /etc/resolv.conf. In particular the settings "main.dns" and "main.rc-manager". If some other part of you system insists on writing systemd-resolved's 127.0.0.53 to /etc/resolv.conf (netplan?) then you must configure this other component to agree with what NetworkManager is doing. There shouldn't be two components fighting over /etc/resolv.conf.


Also, enable level=TRACE logging for NetworkManager. See https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/contrib/fedora/rpm/NetworkManager.conf#n28
You will see a line like:

  dns-mgr[0x55bafcc301a0]: init: dns=default,systemd-resolved rc-manager=symlink

See also lines like

  dns-mgr: update-resolv-conf: write...
Comment 2 André Klapper 2020-11-12 14:27:02 UTC
bugzilla.gnome.org is being shut down in favor of a GitLab instance. 
We are closing all old bug reports and feature requests in GNOME Bugzilla which have not seen updates for a long time.

If you still use NetworkManager and if you still see this bug / want this feature in a recent and supported version of NetworkManager, then please feel free to report it at https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/

Thank you for creating this report and we are sorry it could not be implemented (workforce and time is unfortunately limited).