User Tools

Site Tools


ubuntu:disablednscacheubuntu

Disable DNS Caching on Ubuntu

Disable the systemd-resolved service and stop it:

sudo systemctl disable systemd-resolved.service
sudo service systemd-resolved stop

Put the following line in the [main] section of your /etc/NetworkManager/NetworkManager.conf:

...
[main]
dns=default
...

Delete the symlink /etc/resolv.conf

rm /etc/resolv.conf

create new /etc/resolv.conf

vim /etc/resolv.conf

Restart network-manager

sudo service network-manager restart

OR

sudo systemctl restart NetworkManager.service
ubuntu/disablednscacheubuntu.txt · Last modified: 2022/11/13 19:38 by tschulz