something happens with my DNS and it doesn't work unless I do these steps:
Disable the systemd-resolved service.
sudo systemctl disable systemd-resolved.service
Stop the Service
sudo systemctl stop systemd-resolved.service
Remove the Configuration file manually
sudo rm /etc/resolv.conf
Now, Create the file again.
sudo nano /etc/resolv.conf
Enter the Below Lines
Press CTRL+O to save the File, Then CTRL+X to Close it
Now, Enable the Service
sudo systemctl enable systemd-resolved.service
Start the Service back.
sudo systemctl start systemd-resolved.service
When I do those steps, it works but as soon as the computer logs off or gets restarted, the Googles nameservers 18.104.22.168 get removed and some other gets added which doesn't work.
Why is this happening?
What can I do to fix this? I don't want to do these steps everytime I have to use internet.
Can I fix this without using the Googles DNS?
Hopefully.. someone will be able to help with this odd issue.
Oh and before doing the steps above, I tried pinging the Google.com which doesn't work and when pinging 22.214.171.124 it works. So the internet works but the DNS doesn't resolve unless I use googles DNS server.