CentOS6重启后DNS被还原的解决办法

CentOS6重启后DNS被还原的解决办法

http://luyx30.blog.51cto.com/1029851/1070765/

centos6.5的64位系统,修改完/etc/sysconfig/network-script/ifcfg-eth0之后重启,竟然又恢复回去,

原来是NetworkManager服务在作怪,关闭他,再修改,重启就不会变不回去了。

openvz的虚拟VPS的默认网卡是venet0,没有eth0,则修改 /etc/sysconfig/network-scripts/ifcfg-venet0

临时关闭:service  NetworkManager stop

永久关闭:chkconfig NetworkManager off

修改并备份

vim /etc/resolv.conf

nameserver 8.8.8.8

nameserver 8.8.4.4

nameserver 127.0.0.1

nameserver 4.2.2.2

nameserver 208.67.222.222

nameserver 208.67.222.220

cp /etc/resolv.conf /etc/resolv.conf.bak

vim /etc/sysconfig/network-scripts/ifcfg-venet0

vim  /etc/sysconfig/network-scripts/ifcfg-venet0:0

DNS1=8.8.8.8

DNS2=8.8.4.4

PEERDNS=no

cp /etc/sysconfig/network-scripts/ifcfg-venet0  /etc/sysconfig/network-scripts/ifcfg-venet0.bak

cp /etc/sysconfig/network-scripts/ifcfg-venet0:0  /etc/sysconfig/network-scripts/ifcfg-venet0:0.bak

一些可用的 DNS 服务

首选:165.87.13.129 备用:165.87.201.244

首选:205.171.3.65 备用:205.171.2.65

首选:198.41.0.4 备用:198.41.0.4

首选:198.32.64.12 备用:192.33.4.12

首选:192.203.230.10 备用:192.5.5.241

首选:192.112.36.4 备用:192.36.148.17

首选:192.58.128.30 备用:192.9.9.3

首选:128.9.0.107 备用:128.8.10.90

首选:66.33.206.206 备用:66.33.216.216

首选:208.67.222.222 备用:208.67.220.220

首选:205.171.3.65 备用:205.171.2.65

首选:165.87.13.129 备用:165.87.201.244

上一篇:# vmware异常关机后,虚拟系统无法启动的解决办法


下一篇:不同浏览器的DNS超时重发机制(一)