I use Lubuntu & Kubuntu 18.04. I was able to overcome the DNS problem in 2 steps:
First step: Install
unbound and set it to replace
systemd-resolved as Grégoire C shows here.
sudo systemctl disable systemd-resolved
sudo systemctl stop systemd-resolved
sudo systemctl enable unbound-resolvconf
sudo systemctl enable unbound
Open as root the file
sudo leafpad /etc/NetworkManager/NetworkManager.conf in Lubuntu 18.04 or in Kubuntu 18.04
SUDO_EDITOR=kate sudoedit /etc/NetworkManager/NetworkManager.conf)
[main] put this line:
Second step: If after the reboot the problem is still not solved, as it was in my case, start the file manager as root, go to
resolv.conf and create a new
resolv.conf. Leave it empty and reboot the OS. In my case after this reboot the problem disappeared.
In Kubuntu 18.04 you can't start Dolphin as root, so you can first go to
/etc and open the terminal from there, then type
sudo su and press Enter to use it as root and then delete
resolv.conf with the command
rm resolv.conf. Then you can create a new empty file on your desktop, name it
resolv.conf and open a terminal from there. Use the
sudo su command to enter the root mode for the terminal and then copy the new
resolv.conf from your desktop to
/etc with the command
cp resolv.conf /etc.
I have to add that I did not try to do the second step before installing
unbound, so the next time I will do so, just to see if it will be enough or not.