[CentOS] midco stealling searches, was browsers slowing Centos 7 installation to a crawl
Jonathan Billings
billings at negate.org
Tue Dec 3 13:21:21 UTC 2019
On Mon, Dec 02, 2019 at 06:51:44PM -0600, Michael Hennebry wrote:
> I've chacked on that.
> I've made what seemed like promissing changes to
> /etc/sysconfig/network-scripts/ifup-post and
> /etc/sysconfig/network-scripts/network-functions .
> No go.
> I still get the search line in resolv.conf .
> I've tried putting in search google.com ,
> but on reboot, it still gives me midco and only midco .
>
> Any idea what does affect search in resolv.conf ?
> How can I fix this so I do not have to
> manually edit resolv.conf after each reboot.
Neither of those files are the correct files to edit.
You want to edit the ifcfg-<interface name> file (replace
<interface name> with the name of the network interface) and add
PEERDNS=no in the file. This will make it so DHCP doesn't overwrite
the resolv.conf.
If you just want to hard-code DNS servers, you can either do that in
your networkmanager configuration, or add DNS1=9.9.9.9 to the ifcfg
file. You can add a second IP with DNS2=1.1.1.1, too. Use whatever
DNS IPs you want.
This is documented in /usr/share/doc/initscripts-*/sysconfig.txt
--
Jonathan Billings <billings at negate.org>
More information about the CentOS
mailing list