I am running Ubuntu server 20.04 on a Raspberry Pi 4 and I am having difficulty updating the DNS entry in resolv.conf
. resolv.conf
points to the nameserver 127.0.0.53
; however, I disabled the systemd-networkd dnsstublistener
so I could run my own DNS server. How can I change the nameserver to point to 127.0.0.1
instead?
Use
netplan
instead ofresolv.conf
Add
nameservers
entry.Then to apply and test:
I discovered that my changes were not being applied to
resolv.conf
because of a symbolic link issue. To fix, I first deleted the file/etc/resolv.conf
, which was a symbolic link to /run/systemd/resolve/stub-resolv.conf, and then created a new link to /run/systemd/resolve/resolv.conf.