resolv.conf changes on every reboot eventhough NetworkManager is disabled

Issues related to configuring your network
Post Reply
azaruddin.mohammad
Posts: 1
Joined: 2020/11/03 09:35:11

resolv.conf changes on every reboot eventhough NetworkManager is disabled

Post by azaruddin.mohammad » 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

User avatar
TrevorH
Forum Moderator
Posts: 29915
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2020/11/03 18:51:04

PEERDNS=no in ifcfg-$interface
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

kdpatil
Posts: 31
Joined: 2020/10/20 07:19:31

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

Post by kdpatil » 2020/11/19 03:08:20

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 ?

vinicio.zanchettin
Posts: 3
Joined: 2020/11/20 11:29:51

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

Post by vinicio.zanchettin » 2020/11/20 11:49:10

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

User avatar
TrevorH
Forum Moderator
Posts: 29915
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 2020/11/20 16:18:05

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.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 7 - Networking Support”