Adding DNS Servers in CentoOS 
!!!!CentOS 6.4 !!!!

//the following command overwrites /etc/resolv.conf (or when rebooting)
service network restart
//instead, add the following to /etc/sysconfig/network-scripts/ifcfg-eth0
DNS1=4.2.2.2
DNS2=4.2.2.1

!!!!!!!!!!!!!!!!!!!


//open this file
vim /etc/resolv.conf

//add entries
nameserver 4.2.2.2
nameserver 4.2.2.1

//test
nslookup barney.com

Comments
Comments are not available for this entry.
2024 By Angel Cool