I have centos 6.6 vps server. When I use command: yum update get error:

Error: Cannot find a valid baseurl for repo: base

when I check for ping and use command: ping -c4 google.com get error:

ping: unknown host google.com

or use ping -c4 command get :

4 packets transmitted, 0 received, 100% packet loss, time 12999ms

and /etc/sysconfig/network-scripts/ifcfg-eth0 is:


/etc/sysconfig/network is:


also change NETWORKING_IPV6=yes to no but get same result.

and /etc/resolv.conf is


**Edit: ** and iptables:

target     prot opt source               destination
ACCEPT     icmp --           icmptype 0 state RELATED,ESTABLISHED

Chain FORWARD (policy ACCEPT)
target     prot opt source               destination

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination
ACCEPT     icmp --              icmptype 0
ACCEPT     icmp --            icmptype 8 state NEW,RELATED,ESTABLISHED
  • Can you ping Might be a Firewall issue. Can you try temporarily disabling firewall and try again? If that doesn't work, it is a network problem. Can you ping the gateway? – mzhaase May 2 '17 at 11:09
  • @mzhaase ping both and gateway return: 4 packets transmitted, 0 received, 100% packet loss – mohsenJsh May 2 '17 at 11:29
  • Right, then either ICMP is blocked or network is not working at all. Have you tried with disabled firewall? If it doesn't work with disabled FW and you didn't touch the network settings, I would contact support of the hoster. – mzhaase May 2 '17 at 11:30
  • @mzhaase disable firewall and still not working. and I connect to server with ssh – mohsenJsh May 2 '17 at 11:35
  • You connect to the public IP of your server via SSH? That means that networking works. Unknown host means DNS is not working. Ping not working means ICMP is not working. It seems these are blocked. Can you post your FW configuration? – mzhaase May 2 '17 at 11:45

Okay so let's try to find whats going on :

  1. You can ping external IP address
  2. You cannot ping Domain name

My guess : DNS issue.

Maybe you should check whats inside /etc/resolv.conf to check nameserver ?

Another technique can be traceroute to find where packet is dropped ?

You should use TCPdump to get deeper information about DNS request and other things ?

  • ping external IP will receive 0 is it okay? – mohsenJsh May 2 '17 at 9:07
  • No, what's giving traceroute to an external IP ? I've noticed a /32 netmask is it normal ? – P0pR0cK5 May 2 '17 at 9:08
  • a /32 netmask was default when install centos – mohsenJsh May 2 '17 at 9:12
  • Yeah but, are you sure this is good ? that mean all of the bit of the IP addr is network. Maybe you should try to investigate about this ? – P0pR0cK5 May 2 '17 at 12:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.