Ubuntu 20.04 LTS /etc/resolv.conf
is getting overwritten after either netplan apply or server reboot. We are not using networkmanager.
We did the following changes not sure if this will help:
sudo unlink /etc/resolv.conf
sudo ln -sf /run/systemd/resolve/resolv.conf /etc/resolv.conf
sudo systemctl restart systemd-resolved
sudo systemctl enable systemd-resolved
Add DNS in netplan and do sudo netplan apply
.
[Resolve] DNS=8.8.8.8 ---> can i add my namesserver Remember to restart the service with sudo systemctl restart systemd-resolved
– S M Nov 16 '22 at 13:46