CentOS 7 NetworkManager Keeps Overwriting /etc/resolv.conf
2017-05-04 10:34
591 查看
In CentOS or Red Hat Enterprise Linux (RHEL) 7, you can find your
If you check the content of
The NetworkManager will assume it has the rights to control
To prevent Network Manager to overwrite your
Now, you can manually change the
参考文章:https://ma.ttias.be/centos-7-networkmanager-keeps-overwriting-etcresolv-conf/
/etc/resolv.conffile, which holds all nameserver configurations for your server, to be overwritten by the NetworkManager.
If you check the content of
/etc/resolv.conf, it may look like this.
$ cat /etc/resolv.conf # Generated by NetworkManager search mydomain.tld nameserver 8.8.8.8
The NetworkManager will assume it has the rights to control
/etc/resolv.conf, if it finds a DNS related configuration in your interface configuration file.
$ grep DNS /etc/sysconfig/network-scripts/ifcfg-* DNS1="8.8.8.8" IPV6_PEERDNS="yes"
To prevent Network Manager to overwrite your
resolv.confchanges, remove the DNS1, DNS2, ... lines from
/etc/sysconfig/network-scripts/ifcfg-*.
Now, you can manually change the
/etc/resolv.conffile again, and you should be good to go. NetworkManager will no longer overwrite your DNS nameserver configurations.
参考文章:https://ma.ttias.be/centos-7-networkmanager-keeps-overwriting-etcresolv-conf/
相关文章推荐
- /etc/resolv.conf overwritten. Redhat/Centos
- CentOS6.3 重启后/etc/resolv.conf 被还原解决办法
- CentOS6.3 重启后/etc/resolv.conf被还原解决办法
- Centos重新启动网络配置文件,/etc/resolv.conf被覆盖或清空问题解决
- 两个坑-Linux下Network-Manager有线未托管-DNS resolv.conf文件开机被清空
- CentOS的DNS服务器配置文件/etc/resolv.conf重置问题
- Centos中修改/etc/resolv.conf又恢复到原来的状态
- Centos中修改/etc/resolv.conf又恢复到原来的状态
- CentOS重新启动网络配置,文件/etc/resolv.conf会被错误覆盖或清空解决
- 有关/etc/resolv.conf、/etc/hosts、/etc/sysconfig/network
- centos6.4 /etc/resolv.conf文件改了重启网络就自动还原了
- CentOS6.3 重启后/etc/resolv.conf 被还原解决办法
- Centos中修改etcresolv.conf又恢复到原来的状态_落英缤纷
- Centos中修改/etc/resolv.conf又恢复到原来的状态?
- CentOS6.3 重启后/etc/resolv.conf 被还原解决办法
- Centos中修改/etc/resolv.conf又恢复到原来的状态
- Centos中修改/etc/resolv.conf又恢复到原来的状态
- Linux /etc/resolv.conf 配置DNS
- centos系统,不进行域名解析,resolv.conf配置文件
- ubuntu12.04:/etc/resolv.conf isn't a symlink, not doing anything