I have a client ubuntu 18.04 PC which is connected to the internet but DNS is not working. At first I thought I would have to configure the netplan yaml file which I did like:
network:
version: 2
renderer: NetworkManager
ethernets:
enp2s0:
dhcp4: no
addresses: [10.246.5.248/24]
gateway4: 10.246.5.254
nameservers:
addresses: [10.246.5.1, 127.0.0.53]
search: [<my_domain_name>]
sudo netplan --debug apply
returned no errors and I restarted network-manager, but the network configuration doesn't change no matter how I edit the yaml file.
Then, following the answer to this question, I removed the ethernets configuration from the yaml file, edited my /etc/network/interfaces and restarted the network-manager, but again no changes in the IP address and name servers are being made.
Then, I've tried to run nm-connection-editor
. No interfaces where being listed there, so I've tried adding one interface with my configurations. Again no changes in network configuration, even after restarting the network-manager.
My /etc/resolv.conf file has a symlink to /run/systemd/resolve/stub-resolv.conf. If I edit the stub with my DNS configuration, the DNS starts working, but only until I reboot.
Did I miss something? My guess is that there's other service/program that is changing the resolv.conf. How do I determine which is and configure my DNS there?