I had default Debian DNS settings on my laptop, but I couldn't connect to a corporate remote PC with it. Then I decided to edit DNS servers to corporate ones by editing /etc/resolv.conf
. I've added corporate DNS servers to the file and everything was perfect (i.e. internet connection and rdp connection worked) until I turned off the laptop.
I found out that changes are not permanent and are reset after reboot. Then, I googled for information on how to make changes to DNS permanent, used resolvconf utility and no internet connection was found.
Then it got really complicated and I decided to revert to defaults, removed resolvconf, it didn't work unless I edited /etc/resolv.conf (which reloaded after reboot). It didn't give any result either. My final attempt was to use systemd-resolved to reset settings back to normal. My DNS settings got set back to 127.0.0.53, I found that question, followed the instructions of the fix here with no result. After reboot, I still have no internet connection and service systemd-resolved restart && sudo systemctl restart networking
returns service command not found
.
My current /etc/resolv.conf shows the two nameservers I've manually added to it. I have systemctl running and the links fixed, but still no Internet connection. How am I to revert back to DNS defaults completely and make it work in any network, not just the one I'm in.
There probably was something wrong with DNS settings from the beginning.
P.S. There is an interesting detail, I don't know how it works, but when I'm connected from Debian to my home wifi, I have no internet connection, but I do have an internet connection when I connect to other wifi, and I have a connection when I connect my router and Debian laptop by wire.