Page 1 of 1

resolv.conf changes on every reboot eventhough NetworkManager is disabled

Posted: 2020/11/03 10:54:33
by azaruddin.mohammad
I have a machine with CentOS Linux release 7.8.2003 (Core) and kernel is 3.10.0-1127.19.1.el7.x86_64. ( latest )

Everytime I reboot , the resolv.conf is modified . NetworkManager is already disabled and I unable to find which is controlling resolv.conf stilll.

Did anyone found any bug with this kernel ? or Is there any other configuration to be checked to resolve the issue ?

I see some solutions to add DNS=none option in networkmanager.conf and set immutable permission to resolv.conf file to fix the issue. But this should be implemented if NetworkManager is enabled and if its controlling resolv.conf . But in my case , NetworkManager is disabled already but still something is controlling the resolv.conef.

Any thoughts would be highly appreciated

Re: resolv.conf changes on every reboot eventhough NetworkManager is disabled

Posted: 2020/11/03 18:51:04
by TrevorH
PEERDNS=no in ifcfg-$interface

Re: resolv.conf changes on every reboot eventhough NetworkManager is disabled

Posted: 2020/11/19 03:08:20
by kdpatil
azaruddin.mohammad wrote:
2020/11/03 10:54:33
I have a machine with CentOS Linux release 7.8.2003 (Core) and kernel is 3.10.0-1127.19.1.el7.x86_64. ( latest )

Everytime I reboot , the resolv.conf is modified . NetworkManager is already disabled and I unable to find which is controlling resolv.conf stilll.

Did anyone found any bug with this kernel ? or Is there any other configuration to be checked to resolve the issue ?

I see some solutions to add DNS=none option in networkmanager.conf and set immutable permission to resolv.conf file to fix the issue. But this should be implemented if NetworkManager is enabled and if its controlling resolv.conf . But in my case , NetworkManager is disabled already but still something is controlling the resolv.conef.

Any thoughts would be highly appreciated
Big boss already replied ..


But what does you file below shows ?

cat /etc/sysconfig/network-scripts/ifcfg-*...

Also see if message file give yiu a clue ?

Re: resolv.conf changes on every reboot eventhough NetworkManager is disabled

Posted: 2020/11/20 11:49:10
by vinicio.zanchettin
Hello, try to check if resolvd is installed and disable with.

systemclt stop systemd-resolved
systemclt disable systemd-resolved

But I think that your problem will be solved editing /etc/sysconfig/network-scripts/ifcfg-* (change * for your interface)

##### change as you need #######
TYPE="Ethernet"
PROXY_METHOD="none"
BROWSER_ONLY="no"
BOOTPROTO="none"
DEFROUTE="yes"
IPV4_FAILURE_FATAL="no"
IPV6INIT="yes"
IPV6_AUTOCONF="yes"
IPV6_DEFROUTE="yes"
IPV6_FAILURE_FATAL="no"
IPV6_ADDR_GEN_MODE="stable-privacy"
NAME="eno1"
UUID="660c8f84-0ae6-4866-a624-887021dc04a9"
DEVICE="eno1"
ONBOOT="yes"
IPADDR="192.168.0.18"
PREFIX="23"
GATEWAY="192.168.0.254"
DNS1="192.168.0.254"
IPV6_PRIVACY="no"
#######################################

Let me know if solved!
azaruddin.mohammad wrote:
2020/11/03 10:54:33
I have a machine with CentOS Linux release 7.8.2003 (Core) and kernel is 3.10.0-1127.19.1.el7.x86_64. ( latest )

Everytime I reboot , the resolv.conf is modified . NetworkManager is already disabled and I unable to find which is controlling resolv.conf stilll.

Did anyone found any bug with this kernel ? or Is there any other configuration to be checked to resolve the issue ?

I see some solutions to add DNS=none option in networkmanager.conf and set immutable permission to resolv.conf file to fix the issue. But this should be implemented if NetworkManager is enabled and if its controlling resolv.conf . But in my case , NetworkManager is disabled already but still something is controlling the resolv.conef.

Any thoughts would be highly appreciated

Re: resolv.conf changes on every reboot eventhough NetworkManager is disabled

Posted: 2020/11/20 16:18:05
by TrevorH
Actually if you do that then it will always modify /etc/resolv.conf which is the edxact opposite of what the OP wants. Correct solution is to add PERDNS=no to the ifcfg file to that it will not update and leave it alone instead.