Question

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

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 :-)

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

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.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

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.

Don’t know how to use ufw, but in iptables you must add an entry for incoming connections that permits responses from remote hosts:``` -A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT

Be sure to add this above any ```-j REJECT``` rules

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