Bug 400927 - When changing DNS provider, NM keeps my router's IP as the primary address.
Summary: When changing DNS provider, NM keeps my router's IP as the primary address.
Status: RESOLVED UPSTREAM
Alias: None
Product: systemsettings
Classification: Applications
Component: kcm_networkmanagement (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR major
Target Milestone: ---
Assignee: Jan Grulich
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-10 21:39 UTC by Giorgos Kostopoulos.
Modified: 2024-12-23 18:27 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Giorgos Kostopoulos. 2018-11-10 21:39:46 UTC
SUMMARY

Rather than getting dns infos from my router (from my isp), I changed to another one. To quad9 for the time being.
NM ignores it and continue to use my router's address (192.168.2.2) as the primary dns.

STEPS TO REPRODUCE
1. Edit connections.
2. Switch ti IP4 tab.
3. Choose the proper method (and I tried them all, just in case) and enter the 2 adrreses of quad9 (or whatever dns provider you want. Google, open dns etc.). -> OK.

Rebooting doesn't help.

OBSERVED RESULT

Continue using my local isp and ignoring what I entered.

EXPECTED RESULT

To use whatever dns provider you just choose.

On a 2nd look, I noticed that at /var/run/NetworkManager/resolv.conf it keeps as the first solution my router's ip. Here it is:

# Generated by NetworkManager
nameserver 192.168.2.1
nameserver 9.9.9.9
nameserver 149.112.112.112

Commenting it out or deleting it, solves the problem.

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.8.6.
KDE Frameworks Version: 5.28.0.
Qt Version: 5.7.1.

ADDITIONAL INFORMATION
On Devuan ASCII x64 KDE.
Comment 1 Jan Grulich 2018-11-12 06:33:32 UTC
You should select "Automatic (only addresses)" as method option and then put the dns server you want to use. Simply disconnecting and connecting again should apply the change. Can you attach here output from "nmcli -f all connection show connection_name"? If in the dns field you see your configured DNS server, then I'm afraid that the problem is not on our side, but you will be required to report it for NetworkManager.
Comment 2 Jan Grulich 2018-11-26 14:32:00 UTC
Can you provide requested information?
Comment 3 Giorgos Kostopoulos. 2018-11-26 15:12:04 UTC
Sorry for the delay! :-(
I didn't receive any notification for your reply!

>nmcli -f all connection show connection_name
Error: connection_name - no such connection profile.
>
Comment 4 Jan Grulich 2018-11-27 08:31:32 UTC
You were supposed to change "connection_name" and put there name of your connection where you have this problem.
Comment 5 Giorgos Kostopoulos. 2018-11-29 19:15:44 UTC
Sorry!!! :-)

I'm in a hurry these days, thus the error.

https://paste.kde.org/pbbdnplrv/bea0fe
Comment 6 Jan Grulich 2018-11-30 13:32:31 UTC
It's password protected, can you either upload it again or share the password?
Comment 7 Giorgos Kostopoulos. 2018-11-30 14:35:41 UTC
Sorry!!! :-(

Somehow it was marked as private.
I just removed this flag.
It should be working now.
Comment 8 Jan Grulich 2018-12-03 09:33:55 UTC
I think it looks correct from plasma-nm point of view. The dns option is correctly set. I would suggest reporting this problem to NetworkManager instead.

NM bugzilla: https://gitlab.freedesktop.org/NetworkManager/NetworkManager/issues
Comment 9 Giorgos Kostopoulos. 2018-12-03 11:22:27 UTC
OK!
I'll do it.
THANKS! :-)
G.