Skip to content

Instantly share code, notes, and snippets.

@kurtis318
Created August 23, 2019 19:07
Show Gist options
  • Save kurtis318/3afdaf69786aa0961041c57ef3643db1 to your computer and use it in GitHub Desktop.
Save kurtis318/3afdaf69786aa0961041c57ef3643db1 to your computer and use it in GitHub Desktop.
resolv.conf cleared after every boot

Issue:

Red Hat server file /etc/resolv.conf gets overwritten with an empty file on every boot of the server.

Solution:

Manually add the following line to all the ifcfg-* in /etc/sysconf/network-scripts directory that have BOOTPROTO=dhcp defined:

PERDNS=no

This needs to be done for all network devices even if they are NOT being used.

The following command can be used for all devices that get IPs via dhcp:

TBD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment