Wednesday, May 8, 2024
 Popular · Latest · Hot · Upcoming
12
rated 0 times [  12] [ 0]  / answers: 1 / hits: 22067  / 3 Years ago, sat, november 13, 2021, 9:50:49

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?


More From » dns

 Answers
7

Use netplan instead of resolv.conf


cd /etc/netplan
ls
sudo nano 50-cloud-init.yaml

Add nameservers entry.


network:
ethernets:
[network-device]:
...
nameservers:
addresses:
- 2001:4860:4860::8888
- 2001:4860:4860::8844
- 8.8.8.8
- 8.8.4.4


Then to apply and test:


sudo netplan apply
systemd-resolve --status

[#3520] Saturday, November 13, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
otatorm

Total Points: 218
Total Questions: 113
Total Answers: 124

Location: British Indian Ocean Territory
Member since Tue, Feb 22, 2022
2 Years ago
otatorm questions
;