How to avoid that my /etc/resolv.conf get overwriting

January 3, 2018 1.5k views
Linux Basics Ubuntu 16.04

Always I change my DNS in /etc/resolv.conf it change to :

nameserver 67.207.67.3
nameserver 67.207.67.2

What can I do ?

2 Answers

There should be a warning telling you not to edit resolv.conf. Edit /etc/network/interfaces instead.

  • That looks like it should work since it contains the DNS addresses for Digital Ocean. However changing that file doesn't change the DNS in resolv.conf. At least on Centos.

Or edit /etc/resolvconf/resolveconf.d/base instead. This is used to build resolv.conf

Have another answer? Share your knowledge.