I'd like to take advantage of the recent Cloudflare 1.1.1.1 DNS service on my Ubuntu (17.10, will be on 18.04 LTS when it lands). I can not get the GUI instruction to work (changing the DNS using Network Manager) as the "Apply" button is always greyed out when a make the changes suggested by Cloudflare (it was never going to be that simple!).
So...I started looking into the other suggested option of editing /etc/resolv.conf
. Having read about (and broke things!), I can see that /etc/resolv.conf
should not be edited manually. It currently looks like this:
# This file is managed by man:systemd-resolved(8). Do not edit.
#
# 127.0.0.53 is the systemd-resolved stub resolver.
# run "systemd-resolve --status" to see details about the actual nameservers.
nameserver 127.0.0.53
search default
I think I should edit the /etc/network/interfaces
file as noted in this answer. for me, the interfaces
file looks like this:
# interfaces(5) file used by ifup(8) and ifdown(8)
auto lo
iface lo inet loopback
Given what I have read, should I just add a line to this file like this to account for the IPV4/6 addresses (using spaces to separate)?:
dns-nameservers 1.0.0.1 2606:4700:4700::1111 2606:4700:4700::1001
and then reboot the system?
I'm asking first as I have already had to reconfigure resolv conf because I made changes that broke it. This is the first time I've done anything with DNS or even really understood why it would be good to make this change.
systemd
to manage your networtking?: – Thomas Ward Apr 02 '18 at 13:24