DNS issues

Hello,

I'm experiencing some issues with DNS on a freshly installed node. Seems like after deploying a fresh CentOS 7 Linode, /etc/resolv.conf contain:

cat /etc/resolv.conf
# Generated by Linode Network Helper
# Sun Jul  3 14:43:34 2016 UTC
#
# This file is automatically generated on each boot with your Linode's
# current network configuration. If you need to modify this file, please
# first disable the 'Auto-configure Networking' setting within your Linode's
# configuration profile:
#  - https://manager.linode.com/linodes/config/fireinside?id=2914287
#
# For more information on Network Helper:
#  - https://www.linode.com/docs/platform/network-helper
#
# A backup of the previous config is at /etc/.resolv.conf.linode-last
# A backup of the original config is at /etc/.resolv.conf.linode-orig
#
domain members.linode.com
search members.linode.com
nameserver 139.162.138.5
nameserver 139.162.139.5
nameserver 139.162.130.5
nameserver 139.162.131.5
nameserver 139.162.132.5
nameserver 139.162.133.5
nameserver 139.162.134.5
nameserver 139.162.135.5
nameserver 139.162.136.5
nameserver 139.162.137.5
options rotate

But after a yum update it seems NetworkManager reconfigures the settings done by Linode and changes /etc/resolve.conf back to:

cat /etc/resolv.conf
# Generated by NetworkManager
search outsideit.net

# No nameservers found; try putting DNS servers into your
# ifcfg files in /etc/sysconfig/network-scripts like so:
#
# DNS1=xxx.xxx.xxx.xxx
# DNS2=xxx.xxx.xxx.xxx
# DOMAIN=lab.foo.com bar.foo.com

How can I make sure the Linode configuration is not overwritten after a yum update? Even after adding:

DNS1=8.8.8.8
DNS1=8.8.4.4

to /etc/sysconfig/network-scripts/ifcfg-eth0 it is not able to resolve hosts properly.

Grtz

1 Reply

Solved it by making /etc/resolve.conf immutable:

chattr +i /etc/resolv.conf

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct