"search home.network" keeps appearing my resolv.conf. Because of that some web pages don't load. Is there some way of disabling it? My resolv.conf is managed by Puppet.
"search home.network" keeps appearing my resolv.conf. Because of that some web pages don't load. Is there some way of disabling it? My resolv.conf is managed by Puppet.
Are you sure that resolv.conf isn't managed by resolvconf? If resolvconf is installed and /etc/resolv.conf is a symbolic link to /etc/resolvconf/resolv.conf then resolvconf is managing the file. In that case take a look in the files in /etc/resolvconf/resolv.conf.d/ and remove any lines that look like
domain home.network
orsearch home.network
.If resolvconf is not managing resolv.conf then the string
home.network
is probably being supplied by your DHCP server. Reconfigure the DHCP server so that it doesn't supply this string as a search domain.I think you can solve this applying the same resolution as in here. How do I include lines in resolv.conf that won't get lost on reboot? Basically you add the search domain to your interface configuration in /etc/network/interfaces file.
I cannot add a comment, so here's my answer.
In my case, I was not able to configure the DHCP server to stop supplying the search domain. It was hardcoded on the router.
I had to modify the DHCP client and remove the request for
domain-search
from DHCP server.In the
/etc/dhcp/dhclient.conf
file, make sure there's nodomain-search
asked.See here for more: https://superuser.com/questions/1741966/get-rid-of-search-domain-in-kubernetes-pods-etc-resolv-conf/1741969