$ sudo apt-get install dnsmasq
$ sudoedit /etc/dnsmasq.conf
listen-address=127.0.0.1 cache-size=500
$ sudo systemctl restart dnsmasq
$ dig @127.0.0.1 google.com
$ sudoedit /etc/NetworkManager/NetworkManager.conf
dns=dnsmasq
↓
#dns=dnsmasq
$ sudo systemctl restart NetworkManager