I had set my router's DNS address to CloudFlare's
188.8.131.52. When I boot on linux it doesn't show those DNS' only
127.0.0.1. Cloudflare's DNS shows on Android and Windows 10, but not Ubuntu 16.04.
Ubuntu may have pre-installed caching DNS resolver like dnsmasq or systemd-resolver .you can check if there any local DNS resolver listening to the port 53 using below command
this will show all the programs listening on all the ports TCP and UDP. if there is any then you have to stop that service or configure 184.108.40.206 as upstream DNS of your caching DNS server
nameserver set to 127.0.0.1, that probably means you have a local caching DNS resolver or even a local name server installed.
Typically, the DHCP-specified name servers would then be used as targets for DNS query forwarding in cases where the local cache/server does not have the answer. You might find them in
/run/named/named.forwarders or similar configuration file that is specific to the cache/server.
Basically, the majority of programs will read
/etc/resolv.conf. It points the programs to use the local cache/server, which will have its own DHCP-managed configuration file. The local cache/server will then use the servers specified by DHCP as the upstream DNS source.