Question
How to permanently change DNS nameservers in Ubuntu 18.04.3? Wiki article is not working.
Hello,
I am trying to permanently change the DNS nameserver being using on my droplet.
I following this article:
https://www.digitalocean.com/community/questions/how-do-i-switch-my-dns-resolvers-away-from-google
But the permanent fix option is not working.
The file “/etc/network/interfaces.d/50-cloud-init.cfg” does not exist.
And when I add nameservers to the file “/etc/network/interfaces” and restart the droplet, no change occurs. The file is saved, but the DNS server being used are still the default ones.
My “/etc/network/interfaces” file looks like the following:
auto lo
iface lo inet loopback
source /etc/network/interfaces.d/*
dns-nameservers 208.67.222.222 208.67.220.220
Am I missing something? I am new to Linux.
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
×