Can't use ping in Ubuntu

I'm not sure this question is relevant in this forum, but I really need your helps. I'm using Ubuntu 9.04, and when I do a ping to any ip or host, what I got were always 100% packet loss. This is terrible, since I cannot do many things in my textbook. Please help me to fix this problem. Thank you very much

2

6 Answers

Sounds like you're behind a firewall.

Work out where you first get 100% packet loss of ICMP pings. Try one or two pings to 127.0.0.1, your local external IP interface, your router (if any) or default gateway, ISP hosts (e.g. DNS server, mail server). Try ping -c 3 -w 12 (stop after 3 pings or 12 seconds) and let it finish by itself rather than ending prematurely as some ping, network stacks or networks can cause long delays on ping transmissions: patience can be helpful.

[In particular, for Ubuntu, if you see long delays on sending pings (typically a 5s timeout when pinging by hostname), look at on how the avahi daemon can introduce these delays.]

Possible causes of ping loss:

  1. You may be running a firewall that is discarding pings or ICMP (outbound or inbound)

  2. There may be a router between the client and the server blocking or throttling pings or ICMP traffic

  3. The host you are pinging may be set not to respond to pings or ICMP traffic

try doing a traceroute to help discover where it's dying.

It sounds like your pings are being rejected somewhere. You should check to make sure that ICMP traffic is enabled on your router. Are you able to ping the local host IP?

It does sound like a firewall, but have you tried pinging localhost or 127.0.0.1 or your local IP address? If this works, then it's likely a firewall.

use command $ echo 1 > /proc/sys/net/ipv4/icmp_echo_ignore_all or $ echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_all

Now use ping command ping -c 4 8.8.8.8

if both command doesn't works check the firewall and allow icmp protocol to all ipv4 and ipv6

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like