Ubuntu 16.10+ uses
systemd-resolved
as DNS resolver.I prefer the setup 16.04 uses,
dnsmasq
as the resolver.How can I do that on 16.10+, especially on 17.04?
Answer
dnsmasq
packages are still available in 16.10 and 17.04.
-
Install
dnsmasq
and dependencies (or at least download their packages) before disablingsystemd-resolved
:sudo apt-get install dnsmasq
-
Disable
systemd-resolved
and verifydnsmasq
is running:sudo systemctl stop systemd-resolved sudo systemctl disable systemd-resolved systemctl status dnsmasq
-
Season
dnsmasq
to taste. After applying your settings, restartdnsmasq
:sudo systemctl stop dnsmasq sudo systemctl start dnsmasq
After step 2 you might be without a working system resolver until step 3 is complete. You may need to restart the networking subsystem (or simply reboot) to get dnsmasq
functioning with the default configs. In my testing, adding a known DNS server to /etc/dnsmasq.conf
and restarting dnsmasq
was enough to get it working in a liveCD environment.
Attribution
Source : Link , Question Author : Artyom , Answer Author : quixotic