Report this

What is the reason for this report?

can't ping any website even google.com "unknown host google.com"

Posted on September 11, 2014

I have: 512MB Ram 20GB SSD Disk Singapore 1 LEMP on Ubuntu 14.04

I have installed LEPM one-click installation. then I:

  1. Went through initial server setup
  2. key-based authentication
  3. I ran mysql_secure_installation
  4. installed a firewall (ufw)

now I wanted to install logentries to monitor my server logs and in the installation I have got an error. After lots of search I found out that I cannot ping any domain even google.com. It gives me the following error: ping: unknown host google.com What is the best solution to solve this because I am going to have this server for years so I don’t want a “spaghetti” solution :-)



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Hello,

Can you ping the default gateway ?

I had the same connectivity issue, due to kernel 3.13.0-24, but after upgrading to 3.13.0-32 I was able to ping the default gateway, so my connectivity issues were gone.

Hi,

If you can’t resolve google.com domain, can you show us the content of your /etc/resolv.conf file ?

It is possible that you don’t adress your queries to the proper DNS server. Your /etc/resolv.conf file should contain at least 8.8.8.8 and 8.8.4.4 as DNS servers to have DNS resolution.

Hope this helps !

– rustx

Not a ufw user I prefer iptables. So you have to enter icmp rules to enable ping, from a quick google search I found that you have to enable icmp rules in /etc/ufw/before.rules if there are any rules. If not add the following:

-A ufw-before-input -p icmp --icmp-type destination-unreachable -j ACCEPT -A ufw-before-input -p icmp --icmp-type source-quench -j ACCEPT -A ufw-before-input -p icmp --icmp-type time-exceeded -j ACCEPT -A ufw-before-input -p icmp --icmp-type parameter-problem -j ACCEPT -A ufw-before-input -p icmp --icmp-type echo-request -j ACCEPT

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.