Monday, May 6, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 555  / 3 Years ago, thu, may 13, 2021, 7:01:20

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?


More From » networking

 Answers
0

Assuming that this is a Desktop installation, and not a Server installation...


Undo the changes that you made to /etc/network/interfaces


Edit your netplan .yaml to look like this:


network:
version: 2
renderer: NetworkManager

sudo netplan generate


sudo netplan apply


reboot


Then use the NetworkManager GUI to configure your ethernet interface with your fixed address.


Here are examples using nm-connection-editor (use the regular NetworkManager GUI if you like):


Use the Device pop up to select your ethernet MAC address...


enter image description here


enter image description here


[#679] Saturday, May 15, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
heathree

Total Points: 157
Total Questions: 132
Total Answers: 108

Location: Honduras
Member since Mon, Apr 5, 2021
3 Years ago
;