Configuring cloudflare dns service?

I changed the dns settings to use cloudflare service by adding these two lines in /etc/resolv.conf:

nameserver 1.1.1.1
nameserver 1.0.0.1

But after rebooting the default settings are restored and it shows only this line:

nameserver 192.168.100.1

How to make the change permanent?

Use the Network Manager applet and set the DNS manually for your network interface.

If you are using a router and want Cloudflare to be the DNS provider across all devices, you need to set it up that way in the WAN settings.

If you want it only on a single device, make sure that you Do NOT have a router setting that enables DNS rebind protection.

LANG=C nm-connection-editor
or right click the panel icon and choose edit connections

choose the connection
go to IPv4 settings tab
change the Method from
“automatic(DHCP)”
to
“automatic(DHCP) addresses only”
in the same tab, in the DNS servers field, put the IPv4 name servers you want:
1.1.1.1, 1.0.0.1

do the same thing in the next tab, the IPv6 settings tab
change Method
add server addresses:
2606:4700:4700::1111, 2606:4700:4700::1001

done

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.