PelleH
(Pelle Hanses)
February 19, 2019, 7:59pm
21
/etc/resolv.conf
#Generated by NetworkManager
search lan
nameserver 192.xxx.xxx.61
nameserver 192.xxx.xxx.62
I tested to disable systemd-resolved on my Ubuntu desktop and now it is working as I guessed it would work.
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved
vi /etc/NetworkManager/NetworkManager.conf <
Add
[main]
dns=default
[…]
sudo rm /etc/resolv.conf
sudo reboot
Don’t need to remove /etc/resolv.conf…
You have to launch these commands and all should works.
systemctl stop systemd-resolved
systemctl disable systemd-resolved
ifconfig /flushdns
Then check DNS configuration in NetworkManager. Can be helpful also ifconfig
command.
3 Likes
PelleH
(Pelle Hanses)
February 19, 2019, 8:07pm
23
Thanks, that works !
I wonder why systemd-resolved are implemented in Ubuntu.
One reason I switched over from Zentyal server to Nethserver was theirs DNS not working - when it was Ubuntu’s… But many other things fits my needs better with Nethserver.
2 Likes
Probably systemd-resolved creates an uncorrect dns cache. Please mark the answer as solution: it can be helpful for other Linux users
Now we have an amazing feature on our community platform which helps to mark a topic as SOLVED
As the OP (topic creator) you will have a button that allows you to accept an answer
[image]
Accepted answers are highlighted in the topic list:
[image]
Accepted answers are highlighted on the initial topic:
[image]
This kind of action is enabled only for topic into the Support category
Happy support!
Have a nice evening
1 Like
PelleH
(Pelle Hanses)
February 19, 2019, 9:55pm
25
Some extra info if you have to fix this on Ubuntu 18.04 server. Do like this (rm /etc/resolv.conf because it is a link to a file under /run and cannot be edited):
sudo systemctl disable systemd-resolved.service
sudo systemctl stop systemd-resolved
rm /etc/resolv.conf
vi /etc/resolv.conf
Add following in /etc/resolv.conf (replace 192.xxx.xxx.xxx with the ip address of your DNS servers)
#Generated by NetworkManager
search lan
nameserver 192.xxx.xxx.xxx
nameserver 192.xxx.xxx.xxx
reboot
Now you have control over the DNS settings again.
1 Like
pike
(Michael Kicks)
February 19, 2019, 10:00pm
26
Consider using NetPlan for configure network interfaces on Ubuntu Server.
https://netplan.io/examples
2 Likes