How to setup DNS servers in Ubuntu server?
From time to time I need to set the DNS resolvers on some servers, however when I’m on ubuntu I always forget how to do that, I’m not sure why, but if you like me forget this stuff… look no further! the answer is here!
$ sudo vim /etc/resolvconf/resolv.conf.d/base
Inside this file specify your DNS servers like this:
nameserver 220.127.116.11 nameserver 18.104.22.168
Finally, reload the resolv conf with this command:
$ sudo resolvconf -u
That’s it! Go ahead and test your setup with a simple ping command:
$ ping google.com
It should work without any issues.