Question: I have new CentOS 7 box and I have a problem with the `ping` command.  

When I try to ping

```
ping google.com

```

I get time out and 100% packet loss,
but I can dig/nslookup google.com, and I can browse google.com

I tried to disable `firewalld` but the result is still the same, can't ping to google.com from my CentOS 7

Where is the problem? I thought before in the `firewalld`, but `firewalld` service is now disabled.
How i can fix this problem?

Answer: 
Since only root can send ICMP packets, ping from VM may fail if your supervisor is executed by non-root user.

As mentioned in [answer to this question](https://unix.stackexchange.com/questions/78953/qemu-how-to-ping-host-network), you can config `net.ipv4.ping_group_range` to allow the user running supervisor to send ICMP packets.
You need to setup the nameserver for google.com to resolve to 8.8.8.8

So depending on what you prefer nano or vi on linux you need to do the following:

```
nano /etc/resolv.conf or vi /etc/resolv.conf

You should see DNS1: xxx.xxx.xxx.xxx and DNS2: xxx.xxx.xxx.xxx

```

Nano - Just hit enter under the DNS records to create a new line and type down "nameserver 8.8.8.8" hit I believe it was ctrl x to exit it will ask you if you would like to save hit y then hit enter to save in the same file location.

VI - Just hit insert go at the end of the final DNS record hit enter, this will create a new line type "nameserver 8.8.8.8" hit shift key with ; and then type wq, this command will write then quit the prompt.

Final step to both type ping google.com -c 4 and you will get ping from google.com