0

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?

2 Answers2

0

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.nmconnection file (requires root), modify the following section:
[ipv4]
dns-search=1.1.1.1;
  • Use the nmtui command (without root) that gives you a configuration wizzard.

System wide

  1. Update /etc/systemd/resolved.conf
[Resolve]
DNS=1.1.1.1 8.8.8.8
FallbackDNS=8.8.4.4

  1. Restart system resolved: service systemd-resolved restart
  2. Run systemd-resolve --status

the output should look like this:

Global
         DNS Servers: 1.1.1.1
                      8.8.8.8
...

References:

Siven_7
  • 11
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
  • 2,506