Note
Be sure to run these commands as the root user, or a privileged user using sudo before each command.
chkconfig NetworkManager off; service NetworkManager stop
Step 2: The method for permanent changes is to edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file instead of resolv.conf file. Open the file:
vim /etc/sysconfig/network-scripts/ifcfg-eth0
Next, we’ll set our DNS IP’s to use Google’s Public DNS (8.8.8.8 & 8.8.4.4).
DEVICE="em1"
BOOTPROTO="static"
DNS1="127.0.0.1"
DNS2="8.8.8.8"
DNS3="8.8.4.4"
GATEWAY="some_ip"
HWADDR="hwid"
IPADDR="some_ip"
IPV6INIT="yes"
NETMASK="255.255.255.0"
NM_CONTROLLED="yes"
ONBOOT="yes"
TYPE="Ethernet"
Save and quit the file using ESC and :wq.
Step 3: Enable and restart your network, using the commands associated with your server version.
CentOS 6, CloudLinux 6, RHEL 6:
chkconfig network on
service network start
CentOS 7, CloudLinux 7, RHEL 7:
systemctl enable network.service
systemctl start network.service
Step 4: Test the reachability of a host by using ping, curl, wget or any testing tool of your choice. In our example, we’ve successfully ping’d Google!
ping google.com
PING google.com (172.217.4.46) 56(84) bytes of data.
64 bytes from lga15s46-in-f14.1e100.net (172.217.4.46): icmp_seq=1 ttl=57 time=6.65 ms
64 bytes from lga15s46-in-f14.1e100.net (172.217.4.46): icmp_seq=2 ttl=57 time=6.68 ms
64 bytes from lga15s46-in-f14.1e100.net (172.217.4.46): icmp_seq=3 ttl=57 time=6.68 ms
You don’t have to rack your brain over connectivity issues! Liquid Web customers enjoy 24/7 support for our VPS Managed products. Our knowledgeable team of support techs have experience with solving errors of this nature. Access our support team through a ticket, chat or phone call!