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 18.104.22.168 22.214.171.124
Am I missing something? I am new to Linux.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
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.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!