Custom DNS on Ubuntu

Updated 2018-06-10

Server: Ubuntu 18.04

Provider: Vultr

First of all, there are many tricks.. to set custom DNS on the latest Ubuntu

Let’s get our hand dirty 

1. Edit resolved config file
nano /etc/systemd/resolved.conf

2. Replace #DNS into DNS
DNS=1.1.1.1 9.9.9.9 

3. Restart systemd service 
service systemd-resolved restart

4. Finally, check the status 
systemd-resolve --status