I've been trying to change my DNS in my ubuntu 20.04 via the wifi settings. I select my internet network and go to it's settings. In the ipv4 tab I change the DNS but when I click the apply button the settings window closes completely and when I go back the settings have returned back to normal. Any fixes? Maybe a way I can change my DNS using other means?
Asked
Active
Viewed 1,069 times
2 Answers
1
Ubuntu is using the NetworkManager service to handle the network configuration. There is 2 different levels of modification, specific for a network or system wide.
Specific Network
- Modify the
/etc/NetworkManager/system-connections/MY_NETWORK.nmconnectionfile (requires root), modify the following section:
[ipv4]
dns-search=1.1.1.1;
- Use the
nmtuicommand (without root) that gives you a configuration wizzard.
System wide
- Update
/etc/systemd/resolved.conf
[Resolve]
DNS=1.1.1.1 8.8.8.8
FallbackDNS=8.8.4.4
- Restart system resolved:
service systemd-resolved restart - Run
systemd-resolve --status
the output should look like this:
Global
DNS Servers: 1.1.1.1
8.8.8.8
...
References:
Siven_7
- 21
0
I have had the default network settings GUI crash on me before when trying to do certain things. I worked around it by running nm-connection-editor from terminal. It's an alternative network settings GUI that has more options than the default and always works for me.
When changing certain network options I have found I have to enable/disable the network connection afterwards to get the new settings to take.
codlord
- 3,153