Linux – packets transmitted, 0 received (no internet connection) on centos 6.6 vps

centoscentos6linuxlinux-networkingnetworking

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 62.212.252.84 command get :

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

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

DEVICE=eth0
BOOTPROTO=static
ONBOOT=yes
IPADDR=***.***.***.72
NETMASK=255.255.255.255

/etc/sysconfig/network is:

NETWORKING=yes
NETWORKING_IPV6=yes
HOSTNAME=mohsenvps
GATEWAY=37.59.19.254
IPV6_AUTOCONF=no

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

and /etc/resolv.conf is

nameserver 8.8.8.8
nameserver 8.8.4.4

**Edit: **
and iptables:

target     prot opt source               destination
ACCEPT     icmp --  0.0.0.0/0            202.54.10.20         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 --  0.0.0.0/0            0.0.0.0/0            icmptype 0
ACCEPT     icmp --  202.54.10.20         0.0.0.0/0            icmptype 8 state NEW,RELATED,ESTABLISHED

Best Answer

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 ?