My /etc/resolv.conf (and also /run/systemd/resolve/resolv.conf) contain a
search entry for
wifi.ns.nl that I did not put there and do not want there. It seems related to a problem I have now in that I cannot resolve some web addresses. The resolv.conf files are managed by systemd-resolved and tell me not to edit them manually. If I do that anyway nothing changes and if I restart sytsemd-resolvd it changes the resolv.conf files back to their original state.
search wifi.ns.nl line probably appeared after I tried to connect to a captive wifi network run by
ns.nl. After connecting to the wifi, but before accepting the terms on the web portal, I tried to connect with SSH to a server. That didn't work, and accessing any other website through the wifi also did not work. When I came home and connected to my home network, connecting to the server I wanted to connect to still didn't work, and
systemd-resolve now says
resolve call failed: No appropriate name servers or networks for name found for that server and for *.wifi.ns.nl. (I can still connect to the server using the ip address, and I can resolve the name using
dig on a remote dns server, so the problem is only my local DNS resolver.)
If I do
systemd-resolve --status it also tells me 'wifi.ns.nl' is one of my global DNS Domains.
Apparently something somewhere has remembered some setting probably related to the captive wifi network and
wifi.ns.nl. I've tried restarting
network-manager, but the search entry is still there.
(I also did a
sudo grep -R wifi.ns.nl /etc, it doesn't find 'wifi.ns.nl' anywhere else under
/etc other than the resolv.conf file)
How can I remove that search entry, other than rebooting my system?