I'm trying to add a nameserver to the top of my resolv.conf file on Ubuntu 19.10. I want to always have the nameserver 127.0.0.1 at the top.
I have created a created a new file called:
and in that file I have added:
And that kinda worked when rebooting the computer, however when the laptop goes to sleep the resolv.conf file no longer has my custom name sever prepended to the top of the file. What is the best way to get this change to stick in Ubuntu 19.10?
My /etc/systemd/resolved.conf file looks like this:
[Resolve] DNS=127.0.0.1 #FallbackDNS= #Domains= #LLMNR=no #MulticastDNS=no #DNSSEC=no #DNSOverTLS=no #Cache=yes DNSStubListener=no #ReadEtcHosts=yes
My /etc/resolv.conf file looks like this:
nameserver 127.0.0.53 options edns0 search lan
And the permissions on my /etc/resolv.conf file look like this:
lrwxrwxrwx 1 root root 39 Dec 6 08:09 /etc/resolv.conf -> ../run/systemd/resolve/stub-resolv.conf
Output of systemd-resolv --status
> systemd-resolve --status Global LLMNR setting: no MulticastDNS setting: no DNSOverTLS setting: no DNSSEC setting: no DNSSEC supported: no Current DNS Server: 127.0.0.1 DNS Servers: 127.0.0.1 DNSSEC NTA: 10.in-addr.arpa 16.172.in-addr.arpa 168.192.in-addr.arpa 17.172.in-addr.arpa 18.172.in-addr.arpa 19.172.in-addr.arpa 20.172.in-addr.arpa 21.172.in-addr.arpa 22.172.in-addr.arpa 23.172.in-addr.arpa 24.172.in-addr.arpa 25.172.in-addr.arpa 26.172.in-addr.arpa 27.172.in-addr.arpa 28.172.in-addr.arpa